This was a school project. A command line tetris was implemented, and then I decided to develop a simple and basic UI for this game
This is the command line tetris. To enter a command, type one of the following character and press enter
- Q: move the shape to the left
- D: move the shape to the right
- S: move the shape below until it touches the ground
- A: rotate the shape to the left
- E: rotate the shape to the right
- P: quit the game
This is the UI tetris implemented using Swing. Here is the list of commands
- KEYBOARD_LEFT: move the shape to the left
- KEYBOARD_RIGHT: move the shape to the right
- KEYBOARD_DOWN: move the shape by one cell below
- KEYBOARD_SPACE: rotate the shape to the left
- KEYBOARD_ENTER: move the shape below until it touches the ground
here is a screenshot