A simple Tetris clone coded in Java using the StdDraw library.
(The video is sped up by 8x.)
- Add a score.
- Count the number of lines cleared.
- Be able to hold blocks.
- Be able to see the next block.
Download the project into a folder and run "javac *.java" in the terminal to compile it and "java Main" to run it.
The StdDraw library is linked here. The algorithm used to rotate the pieces is linked here.
Press A, S, or D to move the block left, down, or right. Press R to rotate the piece. Press the space bar to play again once the game is over.