summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-06-30 15:09:25 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-06-30 15:09:25 +0200
commit28af1786f35801c375a870b9bfbbfe3640aa872d (patch)
treeb92514fe2579ceb8bca59d7ffba50a04e9edd4ea /tests
parent8d5f075021d8459766493e115ddf7b5eb4e314a1 (diff)
Initial stab at putting game engine behind a trait
Diffstat (limited to 'tests')
-rw-r--r--tests/live-comparison.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/live-comparison.rs b/tests/live-comparison.rs
index 5f87be3..20dbb2f 100644
--- a/tests/live-comparison.rs
+++ b/tests/live-comparison.rs
@@ -4,6 +4,7 @@ use zombot::input::json;
use zombot::engine::command::{Command, BuildingType};
use zombot::engine::geometry::Point;
use zombot::engine::settings::GameSettings;
+use zombot::engine::GameState;
use std::fs::File;
use std::io::prelude::*;
@@ -26,7 +27,7 @@ fn test_from_replay(replay_folder: &str, length: usize) {
let opponent = read_opponent_command(&format!("{}/Round {:03}/OpponentCommand.txt", replay_folder, i), &settings);
let (_, mut expected_state) = json::read_state_from_file(&format!("{}/Round {:03}/state.json", replay_folder, i+1)).unwrap();
- state.simulate_mut(&settings, player, opponent);
+ state.simulate(&settings, player, opponent);
state.sort();
expected_state.sort();
assert_eq!(state, expected_state, "\nFailed on state {}\n", i+1);