snake
A library to handle the logic for the classic game snake.
Usage
[]
= "0.1.1"
Initialize with new
and use turn
to progress a game step. An example is in game.rs.
Game without display
use ;
let mut game = new;
game.turn;
You can use the display
feature flag to have a window displaying the game. This requires
csfml to be installed.
Game with display
use ;
let window = new;
let mut game = new_display;
Installing CSFML
Arch:
Ubuntu:
git clone https://github.com/jspspike/snake
cd snake
cargo run --example game --features display