/Tetris-Game

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.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Typing SVG

🎮Tetris Game in C++

📜 Description

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.

🛠️Features

  • Classic Tetris gameplay mechanics
  • Keyboard controls for easy maneuvering
  • Scoring system based on lines cleared

🔧Installation

To install the game, follow these steps:

  1. Clone the repository: git clone https://github.com/yourusername/tetris-cpp.git
  2. Navigate to the project directory: cd tetris-cpp
  3. Compile the game using a C++ compiler: g++ -o tetris main.cpp

🛡️ Usage

To play the game, simply run the compiled executable: ./tetris

##♟️ Controls

  • Left Arrow: Move block to the left
  • Right Arrow: Move block to the right
  • Up Arrow: Rotate block
  • Down Arrow: Drop block faster

🎮 how to set

  • 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

⌨️ Contributing

Contributions are welcome! Please read the contributing guidelines before making any changes.

📰 License

This project is licensed under the terms of the MIT license.