MCPcopy Index your code
hub / github.com/baurst/rs_snake

github.com/baurst/rs_snake @0.4.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.4.2 ↗ · + Follow
34 symbols 61 edges 4 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Build Status

Snake ...

... with your friends ...

... on your command line!

This is an implementation of the classic game Snake in Rust. It runs in all UNIX and Windows terminals without using any GUI framework or window manager.

Demo

Try it out!

Using prebuilt binaries

We provide prebuilt binaries for both Windows and Linux. So if you just want to play a quick game you can head over to the Releases section and download the latest release for your platform: Latest Release

Building from Source

Building it yourself is straightforward:

git clone https://github.com/baurst/rs_snake.git
cd rs_snake
cargo run --release

Controls

At the moment, up to two players are supported. The controls for making the snake turn left or right are:

  • Player 1: arrow keys
  • Player 2: WASD keys

Pressing Esc or q will terminate the game.

Options

The game provides options to change to multiplayer mode (using --multi).

Difficulty of the game (i.e. speed of the snake) is adjustable using either --easy or --hard:

$ rs_snake --help
snake 0.3.0
Author: baurst
Classic snake game for your terminal

USAGE:
    rs_snake [FLAGS]

FLAGS:
    -e, --easy                sets difficulty to easy
    -d, --hard                sets difficulty to hard
    -h  --help                Prints help information
    -m, --multi               enables multiplayer mode
    -t, --two_key_steering    steer the snakes using two keys only (increased difficulty)
    -V, --version             Prints version information

Core symbols most depended-on inside this repo

Shape

Method 16
Function 10
Class 6
Enum 2

Languages

Rust100%

Modules by API surface

src/snake.rs16 symbols
src/screen_buffer.rs11 symbols
src/events.rs6 symbols
src/main.rs1 symbols

For agents

$ claude mcp add rs_snake \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page