match
This commit is contained in:
parent
f4066492ce
commit
da86a1dfdc
11
src/main.rs
11
src/main.rs
|
@ -11,6 +11,10 @@ use rand::prelude::*;
|
|||
|
||||
fn main() -> Result<(), &'static str> {
|
||||
|
||||
let program = 2;
|
||||
|
||||
return match program {
|
||||
1 => {
|
||||
let rng = StdRng::seed_from_u64(42);
|
||||
let mut game = Game::new(2, rng)?;
|
||||
game.fill()?;
|
||||
|
@ -23,10 +27,11 @@ fn main() -> Result<(), &'static str> {
|
|||
|
||||
println!("{}", count_options(game, 0, 2));
|
||||
|
||||
|
||||
// calculate_options()?;
|
||||
|
||||
Ok(())
|
||||
},
|
||||
2 => calculate_options(),
|
||||
_ => Err("Not a valid program")
|
||||
}
|
||||
}
|
||||
|
||||
fn run(rng: StdRng) -> Result<(), &'static str> {
|
||||
|
|
Loading…
Reference in New Issue