a_2048_gui
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| a_2048_gui [2026/02/12 16:03] – frchris | a_2048_gui [2026/02/12 16:36] (current) – frchris | ||
|---|---|---|---|
| Line 119: | Line 119: | ||
| } | } | ||
| g.setColor(Color.BLACK); | g.setColor(Color.BLACK); | ||
| + | int thickness = 3; // of the grid lines | ||
| for(int r = 0; r <= boardSize; r++) { | for(int r = 0; r <= boardSize; r++) { | ||
| - | g.drawLine(left, | + | for(int i = 0; i < thickness ; i++) |
| + | | ||
| } | } | ||
| for(int c = 0; c <= boardSize; c++){ | for(int c = 0; c <= boardSize; c++){ | ||
| - | g.drawLine(left+c*size, | + | for(int i = 0; i < thickness ; i++) |
| + | g.drawLine(left+c*size+i, top , | ||
| } | } | ||
| } | } | ||
| Line 173: | Line 176: | ||
| myGame.add2ToBoard(); | myGame.add2ToBoard(); | ||
| if (myGame.gameOver()) | if (myGame.gameOver()) | ||
| - | message = "Game Over - You reached "+ myGame.max(); | + | message = "Game Over - You reached "+ myGame.getMax(); |
| repaint(); | repaint(); | ||
| } | } | ||
a_2048_gui.1770930235.txt.gz · Last modified: by frchris
