diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2019-05-21 13:27:25 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2019-05-21 13:27:25 +0200 |
commit | 63da94f7f1b25eddeb9ffd379f37c1a32e750fdb (patch) | |
tree | 83bd2670e948b16b37890e3ee9785f3672e0d32d /tests | |
parent | b93a9c643485c720a0711ddaf90872b7c6f006c8 (diff) |
More robust game logic and reasoning
Diffstat (limited to 'tests')
-rw-r--r-- | tests/official-runner-matching.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/official-runner-matching.rs b/tests/official-runner-matching.rs index 12b6010..c9cc387 100644 --- a/tests/official-runner-matching.rs +++ b/tests/official-runner-matching.rs @@ -1,6 +1,7 @@ use steam_powered_wyrm::json; use steam_powered_wyrm::game::*; use steam_powered_wyrm::command::Command; +use steam_powered_wyrm::geometry::*; use std::path::Path; use std::fs::File; @@ -99,11 +100,11 @@ fn read_move(csv_line: &[String]) -> Command { match csv_line[1].as_ref() { "move" => { let (x, y) = read_xy_pair(&csv_line[2]); - Command::Move(x, y) + Command::Move(Point2d::new(x, y)) }, "dig" => { let (x, y) = read_xy_pair(&csv_line[2]); - Command::Dig(x, y) + Command::Dig(Point2d::new(x, y)) }, "nothing" => { Command::DoNothing |