calculate length of random game
This commit is contained in:
parent
6bf2071850
commit
155ff387f2
16
src/main.rs
16
src/main.rs
|
@ -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(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue