summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-07-06 00:30:42 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-07-06 00:30:42 +0200
commitf7eef79cb2685d12f361e3903b79bce3583b36fc (patch)
tree4e03d6685e1a44c52dfdaba030a479b324a9722c /tests
parent041cd03fac39dd231d62c79f19a22a5336c49f87 (diff)
Added handling of tesla towers
Diffstat (limited to 'tests')
-rw-r--r--tests/expressive_to_bitwise_comparison.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/expressive_to_bitwise_comparison.rs b/tests/expressive_to_bitwise_comparison.rs
index f08b316..95f867e 100644
--- a/tests/expressive_to_bitwise_comparison.rs
+++ b/tests/expressive_to_bitwise_comparison.rs
@@ -63,12 +63,14 @@ proptest! {
}
fn random_player_move<R: Rng, GSE: GameState, GSB: GameState>(settings: &GameSettings, expressive_state: &GSE, bitwise_state: &GSB, rng: &mut R) -> Command {
- let all_buildings = sensible_buildings(settings, &expressive_state.player(), true);
+ assert_eq!(expressive_state.player_has_max_teslas(), bitwise_state.player_has_max_teslas());
+ let all_buildings = sensible_buildings(settings, &expressive_state.player(), expressive_state.player_has_max_teslas());
random_move(&all_buildings, rng, expressive_state.unoccupied_player_cell_count(), |i| expressive_state.location_of_unoccupied_player_cell(i), |i| bitwise_state.location_of_unoccupied_player_cell(i))
}
fn random_opponent_move<R: Rng, GSE: GameState, GSB: GameState>(settings: &GameSettings, expressive_state: &GSE, bitwise_state: &GSB, rng: &mut R) -> Command {
- let all_buildings = sensible_buildings(settings, &expressive_state.opponent(), true);
+ assert_eq!(expressive_state.player_has_max_teslas(), bitwise_state.player_has_max_teslas());
+ let all_buildings = sensible_buildings(settings, &expressive_state.opponent(), expressive_state.opponent_has_max_teslas());
random_move(&all_buildings, rng, expressive_state.unoccupied_opponent_cell_count(), |i| expressive_state.location_of_unoccupied_opponent_cell(i), |i| bitwise_state.location_of_unoccupied_opponent_cell(i))
}