#snake #game #tui #terminal #cross-platform #running #user-interface

app snake-tui

A cross platform snake game running in the terminal

4 releases

new 0.2.1 Feb 16, 2025
0.2.0 Feb 16, 2025
0.1.1 Feb 9, 2025
0.1.0 Feb 9, 2025

#33 in Games

Download history 161/week @ 2025-02-04 212/week @ 2025-02-11

373 downloads per month

MIT license

17KB
400 lines

snake-tui

A terminal-based Snake game implemented in Rust. This project features a simple and interactive user interface using a terminal TUI (Text User Interface), allowing you to play the classic Snake game directly in your terminal.

You can install it via cargo from crates.io or build it from source.

Crates.io

Features

  • Classic Snake Gameplay: The game follows the traditional Snake mechanics.
  • Terminal-based User Interface (TUI): Built to be fully played within your terminal.
  • Cross-platform: Compatible with any system that supports Rust and the terminal.

Table of Contents

Installation

From Crates.io

You can easily install the Snake Terminal UI directly using cargo by running the following command:

cargo install snake-tui

This will download and install the latest version of the game from crates.io.

Building from source

To build the project from source, follow these steps:

  1. Clone the repository
    git clone https://github.com/RiccardoSegala04/snake-tui.git
    cd snake-tui
    
  2. Build the project using cargo
    cargo build --release
    
  3. Run the game
    cargo run
    

This will compile the code and start the game in your terminal.

Usage

After installation or building from source, you can start the game by simply running:

snake-tui

Control the snake using the arrow keys and try to eat the food to grow the snake longer. The game ends when the snake collides with itself.

Dependencies

~3–12MB
~152K SLoC