Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baurst/rs_snake
🐍 Snake for the command-line
https://github.com/baurst/rs_snake
Last synced: 7 days ago
JSON representation
🐍 Snake for the command-line
- Host: GitHub
- URL: https://github.com/baurst/rs_snake
- Owner: baurst
- License: mit
- Created: 2020-01-24T22:43:35.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-14T11:34:05.000Z (over 3 years ago)
- Last Synced: 2024-08-01T16:40:36.143Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 137 KB
- Stars: 59
- Watchers: 6
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.com/baurst/rs_snake.svg?token=KGmoNyosUqTq92iqGZE9&branch=master)](https://travis-ci.com/baurst/rs_snake)
# 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](img/snake.gif)
## 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](https://github.com/baurst/rs_snake/releases/latest)### Building from Source
Building it yourself is straightforward:
```bash
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 keysPressing 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 terminalUSAGE:
rs_snake [FLAGS]FLAGS:
-e, --easy sets difficulty to easy
-h, --hard sets difficulty to hard
--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
```