Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tahv/term-tetris
A Tetris game written in C using ncurses
https://github.com/tahv/term-tetris
Last synced: 10 days ago
JSON representation
A Tetris game written in C using ncurses
- Host: GitHub
- URL: https://github.com/tahv/term-tetris
- Owner: tahv
- License: mit
- Created: 2022-09-01T21:11:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-06T19:29:57.000Z (over 2 years ago)
- Last Synced: 2023-08-04T22:27:55.726Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 98.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# term-tetris
A Tetris game written in C using `ncurses`.
This is a side project to learn and experiment with the C language.
![gameplay](docs/gameplay.gif)
## Installation
Clone this project and cd into it
```bash
git clone [email protected]:tahv/term-tetris.git && cd term-tetris
```### Manual
Install dependencies
```bash
sudo apt install gcc make libncursesw5-dev
```Compile and run
```bash
make all && ./tetris
```### Docker
You can run the game with the local [Dockerfile](./Dockerfile)
```bash
docker build -t tetris . && docker run -it --rm tetris
```## Commands
| Key | Effect |
| ----------- | ---------- |
| left arrow | move left |
| right arrow | move right |
| up arrow | rotate |
| down arrow | soft drop |
| space | hard drop |
| c | hold |## Features
From the [Tetris Guidelines](https://tetris.wiki/Tetris_Guideline)
- [X] [Random Generator](https://tetris.wiki/Random_Generator) for sequence of tetrominos
- [X] [Marathon](https://tetris.wiki/Marathon) speed curve
- [X] Scoring
- [X] Next piece display
- [X] [Ghost piece](https://tetris.wiki/Ghost_piece)
- [X] [Hold](https://tetris.wiki/Tetris_Guideline) current piece
- [X] Hard Drop
- [X] Game Over
- [ ] [Lock Delay](https://tetris.wiki/Lock_delay)
- [ ] [Super rotation system](https://tetris.wiki/Super_Rotation_System)