This repository contains a simple yet fun implementation of the classic Tetris game, programmed in C++. The game is designed to be easy to play and provides a great way to pass time.
- Classic Tetris gameplay mechanics
- Keyboard controls for easy maneuvering
- Scoring system based on lines cleared
To install the game, follow these steps:
- Clone the repository:
git clone https://github.com/yourusername/tetris-cpp.git
- Navigate to the project directory:
cd tetris-cpp
- Compile the game using a C++ compiler:
g++ -o tetris main.cpp
To play the game, simply run the compiled executable: ./tetris
##♟️ Controls
Left Arrow
: Move block to the leftRight Arrow
: Move block to the rightUp Arrow
: Rotate blockDown Arrow
: Drop block faster
- sudo apt-get install libsfml-dev # install the SFML lib in your linux machine
- git clone https://github.com/rayen-feb/Tetris-Game
- cd Tetris-Game # to open the folder
- g++ -std=c++11 -c main.cpp # to compile.
- g++ main.o -o main.exe -lsfml-graphics -lsfml-window -lsfml-system # to link.
- or you can install just the .exe file and run ./main.exe
Contributions are welcome! Please read the contributing guidelines before making any changes.
This project is licensed under the terms of the MIT license.