diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2019-04-25 16:50:06 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2019-04-25 16:50:06 +0200 |
commit | 510767263a0060ad13b2488a9402b1d176ad65ef (patch) | |
tree | 8f5d1dc7bb290c01c54f30b4ebe2868d8ac80272 /src/main.rs | |
parent | 5c957c0c8e928cbe64eb8a84733d649fd32642ef (diff) |
Test that match replay matches my simulation
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs index 34d0061..d6d9a4c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,14 +1,11 @@ use std::io::prelude::*; use std::io::stdin; +use std::path::Path; -mod command; -mod json; -mod geometry; -mod game; -mod strategy; - -use command::Command; -use strategy::choose_move; +use steam_powered_wyrm::command::Command; +use steam_powered_wyrm::strategy::choose_move; +use steam_powered_wyrm::json; +use steam_powered_wyrm::game; fn main() { let mut game_board = None; @@ -16,7 +13,7 @@ fn main() { let round_number = line.expect("Failed to read line from stdin: {}"); let command = - match json::read_state_from_json_file(&format!("./rounds/{}/state.json", round_number)) { + match json::read_state_from_json_file(&Path::new(&format!("./rounds/{}/state.json", round_number))) { Ok(json_state) => { match &mut game_board { None => { |