Game#25
Conversation
… startupScreen
IvoSchols
left a comment
There was a problem hiding this comment.
Javadoc comments are necessary and commented code should not be in the master branch.
| System.out.println("Hi"); | ||
|
|
||
| public static void main(String[] args) { | ||
| //StartupScreen startupScreen = new StartupScreen(); |
There was a problem hiding this comment.
Please remove commented code.
| */ | ||
| private Launcher() { | ||
| public void launch() { | ||
| //StartupScreen startupScreen = new StartupScreen(); |
There was a problem hiding this comment.
Please remove commented code.
| } | ||
| dragAnimation.end(); | ||
| dragAnimation = null; | ||
| //System.out.println("End Drag Animation"); |
There was a problem hiding this comment.
Please remove commented code.
| add(mainFrame, JLayeredPane.DEFAULT_LAYER); | ||
| setPreferredSize(mainFrame.getPreferredSize()); | ||
|
|
||
| //MyMouseAdapter mouseAdapter = new MyMouseAdapter(this); |
There was a problem hiding this comment.
Please remove commented code.
|
|
||
| } | ||
|
|
||
| private void createHeaderLabel() { |
There was a problem hiding this comment.
Missing javadoc comment
| } | ||
|
|
||
| @Override | ||
| public void start(Point p) { |
There was a problem hiding this comment.
Missing javadoc comment
There was a problem hiding this comment.
It's already in the interface class.
| } | ||
|
|
||
| @Override | ||
| public void update(Point p) { |
There was a problem hiding this comment.
Missing javadoc comment
There was a problem hiding this comment.
It's already in the interface class.
| } | ||
|
|
||
| @Override | ||
| public void end() { |
There was a problem hiding this comment.
Missing javadoc comment
There was a problem hiding this comment.
It's already in the interface class.
| mainScreen.refreshBoard(); | ||
| } | ||
|
|
||
| private void restoreScreen() { |
There was a problem hiding this comment.
Missing javadoc comment
| mainScreen.refreshBoard(); | ||
| } | ||
|
|
||
| private void drawItems(LinkedList<JLabel> list) { |
There was a problem hiding this comment.
Missing javadoc comment
|
using the interface for UI was good ,i see some java docs are missing but Ivo noticed that nicely. |
|
Javadoc comments are added, so the branch seems good to go. |
avanderlinden
left a comment
There was a problem hiding this comment.
Overall seems good. Maybe we can move the checking of the 3-on-row to a separate class or in de game class.
| public static final int BOARD_HEIGHT = 10; | ||
| public static final int SCREEN_WIDTH = 800; | ||
| public static final int SCREEN_HEIGHT = 600; | ||
|
|
There was a problem hiding this comment.
The number of x and y items on the board are related to the dimensions of the screen. They could be linked together.
There was a problem hiding this comment.
I removed them. They are not needed anymore!
| originalYGridPosition = tile.getGridPosition().y; | ||
| int x = (SwingUtilities.convertPoint(tile.getImageIcon(), tile.getImageIcon().getX(), | ||
| tile.getImageIcon().getY(), mainScreen.getGridBoard())).x; | ||
| deltaX = x - MARGIN; |
There was a problem hiding this comment.
deltaX name is a bit vague. The x position shouldn't have to change if you move vertically right?
There was a problem hiding this comment.
I change it to something more clear.
| } | ||
|
|
||
| originalXGridPosition = tile.getGridPosition().x; | ||
| int y = (SwingUtilities.convertPoint(tile.getImageIcon(), tile.getImageIcon().getX(), |
There was a problem hiding this comment.
shouldn't tile.getImageIcon().getX() be tile.getImageIcon().getY() if you try to compute the y position?
There was a problem hiding this comment.
I changed the code and using tile.getX is enough.
No description provided.