For this lab, you have the option to implement one of the following two games
Write a program that implements the popular game Tetris. The game consists of three classes:
For a bonus of 20 points, add an automated solver to the program such that when the player clicks the point, the current game piece will be place in a proper position.
Below is a demo of what we have in mind.
Write a program that implements the game of Minesweeper. The game consists of two classes:
Hints: To distinguish left mouse click from right mouse click in the mousePressed(MouseEvent e) method, call SwingUtilities.isLeftMouseButton(e) will return true of e is triggered by a left click and return false otherwise.
Below is a demo of what we have in mind.
Grading Points | |
Value | Feature |
Style (20 pts total) | |
10 | Appropriate comments |
2 | Good choice of names |
2 | Good use of boolean expressions |
4 | Not doing more work than necessary |
2 | Appropriate parameters |
Correctness (80 pts total) | |