summaryrefslogtreecommitdiff
path: root/src/strategy
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-05-14 22:18:52 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-05-14 22:18:52 +0200
commite762eda31ffa8e722737eba2583154ec038a068f (patch)
tree93b05c6b8b916c8cf20bcd4ddf3a8fd2a8c93fd3 /src/strategy
parentb0455769297964f0b82ef0df78dad8da74e9bca9 (diff)
Changed invalid move checking to be a debug assertion
Diffstat (limited to 'src/strategy')
-rw-r--r--src/strategy/monte_carlo.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/strategy/monte_carlo.rs b/src/strategy/monte_carlo.rs
index 83627b0..59e86a6 100644
--- a/src/strategy/monte_carlo.rs
+++ b/src/strategy/monte_carlo.rs
@@ -4,7 +4,6 @@ use engine::geometry::*;
use engine::{GameState, GameStatus};
use rand::{thread_rng, Rng};
-use std::process;
const MAX_MOVES: u16 = 400;
use time::{Duration, PreciseTime};
@@ -56,11 +55,7 @@ fn simulate_to_endstate<R: Rng>(command_score: &mut CommandScore, settings: &Gam
GameStatus::PlayerWon => command_score.add_victory(),
GameStatus::OpponentWon => command_score.add_defeat(),
GameStatus::Continue => command_score.add_stalemate(),
- GameStatus::Draw => command_score.add_draw(),
- GameStatus::InvalidMove => {
- println!("Invalid move made while performing simulation");
- process::exit(0);
- }
+ GameStatus::Draw => command_score.add_draw()
}
}