This is our final project for cs151, Tetris running on sfml using a character array by Ben Bonus and Davin Lewis.
- Open the terminal
- Update the Ubuntu package lists
$sudo apt update && sudo apt dist-upgrade
- Install the GNU compiler tools (gcc/g++) and the GDB debugger
$ sudo apt install build-essential gdb
- Install git
$ sudo apt install git
- Install SFML libraries
$ sudo install libsfml-dev
- Clone the repository
$ git clone https://github.com/maidenlessCS/PA5 Tetris
- Go to the Tetris directory
$ cd Tetris
- Compile the project
$ g++ -std=C++11 *.cpp -o Tetris -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio
- Run the game
$ ./Tetris
The Game should boot up to a main menu where the player is greeted with a musical them and can choose to play or exit the game. Once the "Play" button is pressed the game will begin, playing the classic Tetris theme in the background.
The objective of the game is survive as long as possible by placing blocks in way that results in an entire row(horizontal) being filled. This will cause the row to clear, allowing more blocks to be placed. The player can move the piece left and right by using the corresponding arrow keys. Pressing the space bar will instantly drop the piece to the bottom. Points are awarded for every piece placed and row cleared, with bonuses based off of speed of placement.
Good luck, have fun!