Skip to content
Permalink
b04dff2fb3
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
26 lines (20 sloc) 444 Bytes
extern crate rustbox;
mod console;
mod game;
use console::Console;
use game::Game;
use rustbox::Key;
fn main() {
let console = Console::new();
let mut game = Game::load();
loop {
game.render(&console);
match console.get_key() {
Some(Key::Char('q')) => { break; }
Some(Key::Char(choice)) => {
game.make_choice(choice)
}
_ => { }
}
}
}