From 155ff387f258aac1698c1b8d76e591869a44c428 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Tue, 5 Jan 2021 16:14:44 +0100 Subject: [PATCH] calculate length of random game --- src/main.rs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/main.rs b/src/main.rs index bb2ab51..fc4e991 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,17 +3,11 @@ use azul::*; use rand::prelude::*; fn main() -> Result<(), &'static str> { - let mut g_rng = StdRng::seed_from_u64(42); - for _ in 0..1000000 { - let rng = match StdRng::from_rng(&mut g_rng) { - Ok(r) => r, - Err(e) => { - println!("error! {:?}", e); - break; - } - }; - run(rng)?; - } + let rng = StdRng::seed_from_u64(42); + let game = Game::new(2, rng)?; + println!("{:#?}", game); + println!("{}", count_options(game, 0)); + Ok(()) }