summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2019-06-29 10:52:18 +0200
committerJustin Worthe <justin@worthe-it.co.za>2019-06-29 10:52:18 +0200
commit886d7f75bca7078799074f0b4e7b80c6f8081f5f (patch)
tree47e9463043bbc7118d8be494fad2340da6c6dc11 /tests
parentd5070033892a531fab75ae1951deeb25c2d5f741 (diff)
Put score allocation behind constants
Diffstat (limited to 'tests')
-rw-r--r--tests/official-runner-matching.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/official-runner-matching.rs b/tests/official-runner-matching.rs
index fcc648f..ffe2468 100644
--- a/tests/official-runner-matching.rs
+++ b/tests/official-runner-matching.rs
@@ -1,4 +1,5 @@
use steam_powered_wyrm::command::{Action, Command};
+use steam_powered_wyrm::constants::*;
use steam_powered_wyrm::game::*;
use steam_powered_wyrm::geometry::*;
use steam_powered_wyrm::json;
@@ -50,10 +51,10 @@ fn simulates_the_same_match() {
);
let _ = game_board.simulate([player_move, opponent_move]);
if player[1] == "invalid" {
- game_board.players[0].moves_score -= 4;
+ game_board.players[0].moves_score -= INVALID_COMMAND_SCORE_PENALTY;
}
if opponent[1] == "invalid" {
- game_board.players[1].moves_score -= 4;
+ game_board.players[1].moves_score -= INVALID_COMMAND_SCORE_PENALTY;
}
}