mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-16 23:12:08 -08:00
28 lines
528 B
Rust
28 lines
528 B
Rust
mod craps_game;
|
|
mod util;
|
|
use crate::craps_game::CrapsGame;
|
|
|
|
fn main() {
|
|
println!("~~Craps~~");
|
|
println!("Creative Computing Morristown, New Jersey\n");
|
|
|
|
let mut quit = false;
|
|
|
|
while !quit {
|
|
let mut game = CrapsGame::new();
|
|
|
|
loop {
|
|
if !game.tick() {
|
|
use util::Response::*;
|
|
|
|
match util::prompt("New Game?") {
|
|
Yes => (),
|
|
No => quit = true,
|
|
}
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|