mirror of
https://github.com/kristoferssolo/Tetris.git
synced 2025-10-21 20:00:35 +00:00
| .github/workflows | ||
| assets | ||
| src | ||
| tests | ||
| tetris | ||
| typst | ||
| .gitignore | ||
| LICENSE | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| requirements_dev.txt | ||
| requirements.txt | ||
| settings.toml | ||
Tetris
Overview
Welcome to Tetris, a classic and timeless game implemented in Python using the Pygame library.
Prerequisites
Before running the Tetris game, make sure you have the following installed on your system:
- Python (version 3.11 recommended)
Running the game
- Clone the repository:
git clone https://github.com/kristoferssolo/Tetris
- Navigate to the project directory:
cd Tetris
- Install the required dependencies:
pip install -e .
- Run the game:
python main.py
# or
python -m tetris
Settings
The settings.toml file is a configuration file for customizing various aspects of the game.
General Settings
pause: Defines the keys to pause the game. Currently a work in progress.quit: Defines the key(s) to quit the game.colorscheme: Specifies the color scheme for the game interface. Options include:tokyonight-nighttokyonight-stormtokyonight-daytokyonight-moon
Movement Settings
left: Defines the keys to move the tetromino1 left.right: Defines the keys to move the tetromino right.down: Defines the keys to accelerate the tetromino's fall.
Rotation Settings
cw (clockwise ): Defines the keys to rotate the tetromino in a clockwise direction.ccw (counter-clockwise): Defines the keys to rotate the tetromino in a counter-clockwise direction.
Action Settings
hold: Defines the keys to hold the tetromino (WIP2).drop: Defines the keys to instantly drop the tetromino.
Volume Settings
Music
enabled: Indicates whether music is enabled.level: Specifies the volume level for the music.
Sound Effects (SFX)
enabled: Indicates whether sound effects are enabled.level: Specifies the volume level for the sound effects.
Acknowledgments
Thanks to Folke, the creator of TokyoNight color theme.