Skip to content

androozhang/tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Tetris Game

A simple implementation of the classic Tetris game using Python and Tkinter.

Table of Contents

Introduction

This project is a basic implementation of the classic game Tetris using Python and the Tkinter library for the graphical interface. Tetris is a tile-matching puzzle video game originally designed and programmed by Alexey Pajitnov in the Soviet Union.

Features

  • Classic Tetris gameplay.
  • Simple and intuitive controls.
  • Score tracking.
  • Game over screen.
  • Restart functionality.

Demo

How to Play

  1. Run the game by executing the playTetris() function in the Python script.
  2. Use the arrow keys to move the falling Tetris pieces.
  3. Press the "Up" arrow key to rotate the pieces.
  4. Try to complete horizontal lines with the Tetris pieces to clear them and score points.
  5. The game ends when the pieces stack up to the top of the screen.

Installation

To run the Tetris game on your local machine, follow these steps:

  1. Clone the repository to your computer.

    git clone https://github.com/your-username/tetris-game.git
    
  2. Navigate to the project directory.

    cd tetris-game
    
  3. Run the game.

    python tetris.py
    

Controls

  • Use the "Left" and "Right" arrow keys to move the falling piece horizontally.
  • Use the "Down" arrow key to move the piece down faster.
  • Press the "Up" arrow key to rotate the falling piece.
  • Press the "R" key to restart the game.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Enjoy playing Tetris!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages