Crates.io | tui-snake |
lib.rs | tui-snake |
version | 0.1.0 |
source | src |
created_at | 2021-07-30 14:02:31.042399 |
updated_at | 2021-07-30 14:02:31.042399 |
description | TUI implementation of Snake |
homepage | |
repository | https://github.com/NomisIV/tui-snake/ |
max_upload_size | |
id | 429299 |
size | 16,587 |
...but written as a TUI program in rust.
This program uses termion for generating escape codes for the graphics. The only other dependency is rand for randomizing the position of the food piece.
The implementation is multithreaded:
Communication between the threads is done by using mpsc channels, which I'd never heard of before starting this project, but they proved to be incredibly useful.
cargo install tui-snake
tui-snake
Currently the program doesn't support any command line options / flags, and the entire terminal is used as a playing field. This might come to change with later versions.
To exit the program while running,
press Esc
or Ctrl+c
.