This is a simple implementation of the classic Tetris game that runs directly in the terminal. The game is built in C and uses the ncurses
library for handling terminal graphics and input.
- You can play Tetris ^^.
Before you can compile and run the game, ensure the following dependencies are installed on your system:
- GCC (GNU Compiler Collection)
ncurses
library
sudo apt update
sudo apt install gcc libncurses-dev
You can use the setAlias.sh file to create a Alias in the .zshrc and .bash_aliases file.
The Alias goes to the directory where the game is located and runs it. Just type tetris
.
bash setAlias.sh
To compile the game, run the following command in the project directory:
make
This will generate an executable file named tetris
.
Once compiled, you can run the game using:
./tetris
- A / D / W: Move the tetromino left or right, or rotate it.
- Space: Hard drop the tetromino.
- Down Arrow: Soft drop.
- Z: Hold the tetromino.
- ESC: Quit the game.
- (You can change the controls)
fair evaluation :)