summaryrefslogtreecommitdiff
path: root/tests/strategy.rs
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2022-04-19 21:27:56 +0200
committerJustin Wernick <justin@worthe-it.co.za>2022-04-19 21:27:56 +0200
commit3f5492b2bb67326be43cd7c5ba02ccf0ba1ae0e3 (patch)
tree96963ba885a9393106b4a88ffc4266203e87582e /tests/strategy.rs
parent4ceec65b088f05d4ad03f9ac70b1d63452fd8197 (diff)
Refile for merging repos
Diffstat (limited to 'tests/strategy.rs')
-rw-r--r--tests/strategy.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/strategy.rs b/tests/strategy.rs
deleted file mode 100644
index 7088099..0000000
--- a/tests/strategy.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-use std::path::Path;
-
-use steam_powered_wyrm::game;
-use steam_powered_wyrm::json;
-use steam_powered_wyrm::strategy::{choose_move_with_normalized_perf, ScoreConfig};
-
-#[test]
-fn strategy_is_implemented_symetrically() {
- let state = game::GameBoard::new(
- json::read_state_from_json_file(&Path::new(&format!("./tests/example-state.json")))
- .unwrap(),
- );
- let depth = 100;
-
- let config = ScoreConfig::default();
- let flipped_state = {
- let mut flipped_state = state.clone();
- flipped_state.players[0] = state.players[1].clone();
- flipped_state.players[1] = state.players[0].clone();
- flipped_state
- };
-
- let position_one_move = choose_move_with_normalized_perf(&state, &config, 0, depth);
- let position_two_move = choose_move_with_normalized_perf(&flipped_state, &config, 1, depth);
-
- assert_eq!(position_one_move, position_two_move);
-}