This was the final project from my high school AP Computer Science class. Some of the implementation could be improved, considering it was written back when I had a lot less experience, but I still enjoyed the project and enjoy messing around with it from time to time. I am putting it up here on gitub so others can play with it, too.
Note on the github version
- In my original project, the audio files that played by default were the Tetris theme, with an alternate audio of Viva la Vida by Coldplay. Because I do not own the rights to either song, I have replaced the audio files with white noise. To get your own audio, replace "AudioOne.wav" and "AudioTwo.wav" with wahtever you want.
- I have now included a makefile that will run in Linux.
- "make clean" will remove all java class files
- "make run" will build and run the java project
- "make start" will run the project without rebuilding
- The Tetris-like game will start when the TetrixBoard.java class is run.
- The left and right arrow keys will move Tetriminos left and right, respectively
- The down arrow key will "soft drop" (move a piece one square down)
- The up arrow key will "hard drop" (place a piece all the way down)
- The space bar will rotate Tetriminos
- The "H" Key will initiate the Hold
- The "P" Key will pause/play your current game
- The "N" key while paused or after a game will restart a new game
- Pressing the "Q" key while playing will queue up a straight piece as the next Tetrimino off screen
- This cheat code was fun while debugging but also allowed me to get much higher scores
- The "M" key will mute/unmute the audio playback
- The "V" key will toggle between AudioOne and AudioTwo