https://github.com/jserv/auto-tetris
Play Tetris game automatically!
https://github.com/jserv/auto-tetris
artificial-intelligence terminal-based tetris-clone
Last synced: over 1 year ago
JSON representation
Play Tetris game automatically!
- Host: GitHub
- URL: https://github.com/jserv/auto-tetris
- Owner: jserv
- License: mit
- Created: 2022-11-24T21:44:34.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-13T17:04:52.000Z (over 3 years ago)
- Last Synced: 2025-04-22T22:57:04.778Z (over 1 year ago)
- Topics: artificial-intelligence, terminal-based, tetris-clone
- Language: C
- Homepage:
- Size: 23.4 KB
- Stars: 16
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# auto-tetris
Play Tetris game automatically!
## Features
* AI for Tetris
* Simple ncurses based user interface
## Build and Run
`auto-tetris` requires [ncurses](https://invisible-island.net/ncurses/).
Debian/Ubuntu Dependencies:
```shell
sudo apt install libncurses5-dev
```
To build `auto-tetris`, run `make` inside the directory where you have the source.
```shell
make
```
To play the game, run the executable 'tetris'.
```shell
./tetris
```
Key mapping:
* space: Pause toggle
* Q: Quit the game
## TODO
* Replace ncurses with direct terminal I/O. See [libtetris](https://github.com/HugoNikanor/libtetris) for tty graphics.
* Refine memory management. At present, leaks and buffer overrun exist.
* Colorize the blocks. [libtetris](https://github.com/HugoNikanor/libtetris) does the elegant work.
* Allow external programs to train the AI.
## License
`auto-tetris` is available under a permissive MIT-style license.
Use of this source code is governed by a MIT license that can be found in the [LICENSE](LICENSE) file.