https://github.com/domin-mnd/tetris
đšī¸ Terminal-based tetris written in C.
https://github.com/domin-mnd/tetris
c ncurses tetris
Last synced: over 1 year ago
JSON representation
đšī¸ Terminal-based tetris written in C.
- Host: GitHub
- URL: https://github.com/domin-mnd/tetris
- Owner: domin-mnd
- License: mit
- Created: 2025-01-29T18:28:54.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-30T18:54:10.000Z (over 1 year ago)
- Last Synced: 2025-02-07T11:17:48.537Z (over 1 year ago)
- Topics: c, ncurses, tetris
- Language: C
- Homepage:
- Size: 215 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tetris!
This is a small implementation of terminal-based tetris game written in C using ncurses.h library.
# Controls
The controls are typical of Tetris:
- â & â - moves the tetromino horizontally;
- â - rotate the tetromino;
- â - fast drop tetromino;
- Space - immediately drop tetromino;
- Q - exit the game, without saving the score;
- P - pause the game (press again to resume).
# Installation
> [!NOTE]
> Executables, compiled using [GitHub Actions](./.github/workflows/build-release.yml) are accessible via [Releases](https://github.com/domin-mnd/tetris/releases) tab.
If you want to compile the project using source code, here are following prerequisites required:
- ncurses: `pacman -S ncurses` / `apt install libncurses-dev`
- just: `pacman -S just` / `apt install just`
To compile the project run `just install`, it would compile the project and output `tetris` file:
```sh
$ just install
gcc -Wall -Wextra -Werror -std=c2x -O3 -Isrc/include src/tetris.c src/main.c -o tetris -lncurses
$ ./tetris
```
# Credits
This tetris implementation is MIT licensed đ