From 1175558f5264ebf8fad43104eade11199f7707d1 Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Sun, 7 Jan 2024 20:43:37 +0200 Subject: [PATCH] docs: add readme --- README.md | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/README.md b/README.md index e69de29..2003840 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,90 @@ +# Tetris + + + +- [Overview](#overview) +- [Prerequisites](#prerequisites) +- [Running the game](#running-the-game) +- [Settings](#settings) + * [General Settings](#general-settings) + * [Movement Settings](#movement-settings) + * [Rotation Settings](#rotation-settings) + * [Action Settings](#action-settings) + * [Volume Settings](#volume-settings) + + [Music](#music) + + [Sound Effects (SFX)](#sound-effects-sfx) +- [Acknowledgments](#acknowledgments) + + + +## Overview + +Welcome to Tetris, a classic and timeless game implemented in Python using the [Pygame](https://www.pygame.org/) 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 + +1. Clone the repository: +```bash +git clone https://github.com/kristoferssolo/Tetris +``` + +2. Navigate to the project directory: +```bash +cd Tetris +``` + +3. Install the required dependencies: +```bash +pip install . +``` + +4. Run the game: +```bash +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 (WIP). +- `Quit`: Defines the key(s) to quit the game. +- `Colorscheme`: Specifies the color scheme for the game interface. Options include: + - `tokyonight-night` + - `tokyonight-storm` + - `tokyonight-day` + - `tokyonight-moon` + +### Movement Settings +- `Left`: Defines the keys to move the tetromino[^tetromino] left. +- `Right`: Defines the keys to move the tetromino right. +- `Down`: Defines the keys to accelerate the tetromino's fall. + +### Rotation Settings +- `Clockwise (cw)`: Defines the keys to rotate the tetromino in a clockwise direction. +- `Counter-Clockwise (ccw)`: Defines the keys to rotate the tetromino in a counter-clockwise direction. + +### Action Settings +- `Hold`: Defines the keys to hold the tetromino (WIP). +- `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](https://github.com/folke), the creator of [TokyoNight](https://github.com/folke/tokyonight.nvim) color theme. + +[^tetromino]: A tetromino is a geometric shape composed of four squares, connected orthogonally (i.e. at the edges and not the corners).