calculate length of random game

This commit is contained in:
Daniel Olsen 2021-01-05 16:14:44 +01:00
parent 6bf2071850
commit 155ff387f2
1 changed files with 5 additions and 11 deletions

View File

@ -3,17 +3,11 @@ use azul::*;
use rand::prelude::*; use rand::prelude::*;
fn main() -> Result<(), &'static str> { fn main() -> Result<(), &'static str> {
let mut g_rng = StdRng::seed_from_u64(42); let rng = StdRng::seed_from_u64(42);
for _ in 0..1000000 { let game = Game::new(2, rng)?;
let rng = match StdRng::from_rng(&mut g_rng) { println!("{:#?}", game);
Ok(r) => r, println!("{}", count_options(game, 0));
Err(e) => {
println!("error! {:?}", e);
break;
}
};
run(rng)?;
}
Ok(()) Ok(())
} }