diff options
124 files changed, 139 insertions, 2 deletions
diff --git a/src/engine/mod.rs b/src/engine/mod.rs index 7a39214..8078ca9 100644 --- a/src/engine/mod.rs +++ b/src/engine/mod.rs @@ -127,7 +127,7 @@ impl GameState { GameState::update_construction(&mut self.player_unconstructed_buildings, &mut self.player_buildings, &mut self.player); GameState::update_construction(&mut self.opponent_unconstructed_buildings, &mut self.opponent_buildings, &mut self.opponent); - GameState::fire_teslas(&mut self.player, &mut self.player_buildings, &mut self.opponent, &mut self.opponent_buildings, &settings); + GameState::fire_teslas(&mut self.player, &mut self.player_buildings, &mut self.unoccupied_player_cells, &mut self.opponent, &mut self.opponent_buildings, &mut self.unoccupied_opponent_cells, &settings); GameState::add_missiles(&mut self.player_buildings, &mut self.player_missiles); GameState::add_missiles(&mut self.opponent_buildings, &mut self.opponent_missiles); @@ -202,7 +202,7 @@ impl GameState { unconstructed_buildings.truncate(buildings_len); } - fn fire_teslas(player: &mut Player, player_buildings: &mut Vec<Building>, opponent: &mut Player, opponent_buildings: &mut Vec<Building>, settings: &GameSettings) { + fn fire_teslas(player: &mut Player, player_buildings: &mut Vec<Building>, player_unoccupied_cells: &mut Vec<Point>, opponent: &mut Player, opponent_buildings: &mut Vec<Building>, opponent_unoccupied_cells: &mut Vec<Point>,settings: &GameSettings) { for tesla in player_buildings.iter_mut().filter(|b| b.weapon_damage == 20) { if tesla.weapon_cooldown_time_left > 0 { tesla.weapon_cooldown_time_left -= 1; @@ -250,7 +250,17 @@ impl GameState { } } } + + for building in player_buildings.iter().filter(|b| b.health == 0) { + player_unoccupied_cells.push(building.pos); + player.energy_generated -= building.energy_generated_per_turn; + } player_buildings.retain(|b| b.health > 0); + + for building in opponent_buildings.iter().filter(|b| b.health == 0) { + opponent_unoccupied_cells.push(building.pos); + opponent.energy_generated -= building.energy_generated_per_turn; + } opponent_buildings.retain(|b| b.health > 0); } diff --git a/tests/after_203_teslas/Round 000/OpponentCommand.txt b/tests/after_203_teslas/Round 000/OpponentCommand.txt new file mode 100644 index 0000000..3fff544 --- /dev/null +++ b/tests/after_203_teslas/Round 000/OpponentCommand.txt @@ -0,0 +1 @@ +4,1,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 000/PlayerCommand.txt b/tests/after_203_teslas/Round 000/PlayerCommand.txt new file mode 100644 index 0000000..3fff544 --- /dev/null +++ b/tests/after_203_teslas/Round 000/PlayerCommand.txt @@ -0,0 +1 @@ +4,1,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 001/OpponentCommand.txt b/tests/after_203_teslas/Round 001/OpponentCommand.txt new file mode 100644 index 0000000..bdb74d0 --- /dev/null +++ b/tests/after_203_teslas/Round 001/OpponentCommand.txt @@ -0,0 +1 @@ +No Command
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 001/PlayerCommand.txt b/tests/after_203_teslas/Round 001/PlayerCommand.txt new file mode 100644 index 0000000..bdb74d0 --- /dev/null +++ b/tests/after_203_teslas/Round 001/PlayerCommand.txt @@ -0,0 +1 @@ +No Command
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 002/OpponentCommand.txt b/tests/after_203_teslas/Round 002/OpponentCommand.txt new file mode 100644 index 0000000..bdb74d0 --- /dev/null +++ b/tests/after_203_teslas/Round 002/OpponentCommand.txt @@ -0,0 +1 @@ +No Command
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 002/PlayerCommand.txt b/tests/after_203_teslas/Round 002/PlayerCommand.txt new file mode 100644 index 0000000..bdb74d0 --- /dev/null +++ b/tests/after_203_teslas/Round 002/PlayerCommand.txt @@ -0,0 +1 @@ +No Command
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 003/OpponentCommand.txt b/tests/after_203_teslas/Round 003/OpponentCommand.txt new file mode 100644 index 0000000..b0fd0dc --- /dev/null +++ b/tests/after_203_teslas/Round 003/OpponentCommand.txt @@ -0,0 +1 @@ +0,2,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 003/PlayerCommand.txt b/tests/after_203_teslas/Round 003/PlayerCommand.txt new file mode 100644 index 0000000..b0fd0dc --- /dev/null +++ b/tests/after_203_teslas/Round 003/PlayerCommand.txt @@ -0,0 +1 @@ +0,2,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 004/OpponentCommand.txt b/tests/after_203_teslas/Round 004/OpponentCommand.txt new file mode 100644 index 0000000..bdb74d0 --- /dev/null +++ b/tests/after_203_teslas/Round 004/OpponentCommand.txt @@ -0,0 +1 @@ +No Command
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 004/PlayerCommand.txt b/tests/after_203_teslas/Round 004/PlayerCommand.txt new file mode 100644 index 0000000..bdb74d0 --- /dev/null +++ b/tests/after_203_teslas/Round 004/PlayerCommand.txt @@ -0,0 +1 @@ +No Command
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 005/OpponentCommand.txt b/tests/after_203_teslas/Round 005/OpponentCommand.txt new file mode 100644 index 0000000..153865b --- /dev/null +++ b/tests/after_203_teslas/Round 005/OpponentCommand.txt @@ -0,0 +1 @@ +2,0,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 005/PlayerCommand.txt b/tests/after_203_teslas/Round 005/PlayerCommand.txt new file mode 100644 index 0000000..153865b --- /dev/null +++ b/tests/after_203_teslas/Round 005/PlayerCommand.txt @@ -0,0 +1 @@ +2,0,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 006/OpponentCommand.txt b/tests/after_203_teslas/Round 006/OpponentCommand.txt new file mode 100644 index 0000000..bdb74d0 --- /dev/null +++ b/tests/after_203_teslas/Round 006/OpponentCommand.txt @@ -0,0 +1 @@ +No Command
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 006/PlayerCommand.txt b/tests/after_203_teslas/Round 006/PlayerCommand.txt new file mode 100644 index 0000000..bdb74d0 --- /dev/null +++ b/tests/after_203_teslas/Round 006/PlayerCommand.txt @@ -0,0 +1 @@ +No Command
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 007/OpponentCommand.txt b/tests/after_203_teslas/Round 007/OpponentCommand.txt new file mode 100644 index 0000000..f217f6d --- /dev/null +++ b/tests/after_203_teslas/Round 007/OpponentCommand.txt @@ -0,0 +1 @@ +5,6,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 007/PlayerCommand.txt b/tests/after_203_teslas/Round 007/PlayerCommand.txt new file mode 100644 index 0000000..9233a2a --- /dev/null +++ b/tests/after_203_teslas/Round 007/PlayerCommand.txt @@ -0,0 +1 @@ +0,4,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 008/OpponentCommand.txt b/tests/after_203_teslas/Round 008/OpponentCommand.txt new file mode 100644 index 0000000..bdb74d0 --- /dev/null +++ b/tests/after_203_teslas/Round 008/OpponentCommand.txt @@ -0,0 +1 @@ +No Command
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 008/PlayerCommand.txt b/tests/after_203_teslas/Round 008/PlayerCommand.txt new file mode 100644 index 0000000..bdb74d0 --- /dev/null +++ b/tests/after_203_teslas/Round 008/PlayerCommand.txt @@ -0,0 +1 @@ +No Command
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 009/OpponentCommand.txt b/tests/after_203_teslas/Round 009/OpponentCommand.txt new file mode 100644 index 0000000..c7d9109 --- /dev/null +++ b/tests/after_203_teslas/Round 009/OpponentCommand.txt @@ -0,0 +1 @@ +5,2,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 009/PlayerCommand.txt b/tests/after_203_teslas/Round 009/PlayerCommand.txt new file mode 100644 index 0000000..6628f95 --- /dev/null +++ b/tests/after_203_teslas/Round 009/PlayerCommand.txt @@ -0,0 +1 @@ +3,5,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 010/OpponentCommand.txt b/tests/after_203_teslas/Round 010/OpponentCommand.txt new file mode 100644 index 0000000..07b92b5 --- /dev/null +++ b/tests/after_203_teslas/Round 010/OpponentCommand.txt @@ -0,0 +1 @@ +3,2,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 010/PlayerCommand.txt b/tests/after_203_teslas/Round 010/PlayerCommand.txt new file mode 100644 index 0000000..d17d619 --- /dev/null +++ b/tests/after_203_teslas/Round 010/PlayerCommand.txt @@ -0,0 +1 @@ +5,0,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 011/OpponentCommand.txt b/tests/after_203_teslas/Round 011/OpponentCommand.txt new file mode 100644 index 0000000..4a9590d --- /dev/null +++ b/tests/after_203_teslas/Round 011/OpponentCommand.txt @@ -0,0 +1 @@ +0,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 011/PlayerCommand.txt b/tests/after_203_teslas/Round 011/PlayerCommand.txt new file mode 100644 index 0000000..239b17a --- /dev/null +++ b/tests/after_203_teslas/Round 011/PlayerCommand.txt @@ -0,0 +1 @@ +1,4,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 012/OpponentCommand.txt b/tests/after_203_teslas/Round 012/OpponentCommand.txt new file mode 100644 index 0000000..3362217 --- /dev/null +++ b/tests/after_203_teslas/Round 012/OpponentCommand.txt @@ -0,0 +1 @@ +0,3,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 012/PlayerCommand.txt b/tests/after_203_teslas/Round 012/PlayerCommand.txt new file mode 100644 index 0000000..b0f2a85 --- /dev/null +++ b/tests/after_203_teslas/Round 012/PlayerCommand.txt @@ -0,0 +1 @@ +6,4,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 013/OpponentCommand.txt b/tests/after_203_teslas/Round 013/OpponentCommand.txt new file mode 100644 index 0000000..0b12f52 --- /dev/null +++ b/tests/after_203_teslas/Round 013/OpponentCommand.txt @@ -0,0 +1 @@ +2,4,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 013/PlayerCommand.txt b/tests/after_203_teslas/Round 013/PlayerCommand.txt new file mode 100644 index 0000000..85eacdb --- /dev/null +++ b/tests/after_203_teslas/Round 013/PlayerCommand.txt @@ -0,0 +1 @@ +3,2,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 014/OpponentCommand.txt b/tests/after_203_teslas/Round 014/OpponentCommand.txt new file mode 100644 index 0000000..f87d2e2 --- /dev/null +++ b/tests/after_203_teslas/Round 014/OpponentCommand.txt @@ -0,0 +1 @@ +4,5,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 014/PlayerCommand.txt b/tests/after_203_teslas/Round 014/PlayerCommand.txt new file mode 100644 index 0000000..533b1c8 --- /dev/null +++ b/tests/after_203_teslas/Round 014/PlayerCommand.txt @@ -0,0 +1 @@ +2,6,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 015/OpponentCommand.txt b/tests/after_203_teslas/Round 015/OpponentCommand.txt new file mode 100644 index 0000000..c27eaf9 --- /dev/null +++ b/tests/after_203_teslas/Round 015/OpponentCommand.txt @@ -0,0 +1 @@ +5,1,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 015/PlayerCommand.txt b/tests/after_203_teslas/Round 015/PlayerCommand.txt new file mode 100644 index 0000000..c4e7948 --- /dev/null +++ b/tests/after_203_teslas/Round 015/PlayerCommand.txt @@ -0,0 +1 @@ +2,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 016/OpponentCommand.txt b/tests/after_203_teslas/Round 016/OpponentCommand.txt new file mode 100644 index 0000000..ad5a4bc --- /dev/null +++ b/tests/after_203_teslas/Round 016/OpponentCommand.txt @@ -0,0 +1 @@ +3,4,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 016/PlayerCommand.txt b/tests/after_203_teslas/Round 016/PlayerCommand.txt new file mode 100644 index 0000000..6cf40d9 --- /dev/null +++ b/tests/after_203_teslas/Round 016/PlayerCommand.txt @@ -0,0 +1 @@ +1,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 017/OpponentCommand.txt b/tests/after_203_teslas/Round 017/OpponentCommand.txt new file mode 100644 index 0000000..8a842f9 --- /dev/null +++ b/tests/after_203_teslas/Round 017/OpponentCommand.txt @@ -0,0 +1 @@ +4,2,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 017/PlayerCommand.txt b/tests/after_203_teslas/Round 017/PlayerCommand.txt new file mode 100644 index 0000000..4a9590d --- /dev/null +++ b/tests/after_203_teslas/Round 017/PlayerCommand.txt @@ -0,0 +1 @@ +0,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 018/OpponentCommand.txt b/tests/after_203_teslas/Round 018/OpponentCommand.txt new file mode 100644 index 0000000..5ff9de4 --- /dev/null +++ b/tests/after_203_teslas/Round 018/OpponentCommand.txt @@ -0,0 +1 @@ +3,5,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 018/PlayerCommand.txt b/tests/after_203_teslas/Round 018/PlayerCommand.txt new file mode 100644 index 0000000..5e4b046 --- /dev/null +++ b/tests/after_203_teslas/Round 018/PlayerCommand.txt @@ -0,0 +1 @@ +0,1,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 019/OpponentCommand.txt b/tests/after_203_teslas/Round 019/OpponentCommand.txt new file mode 100644 index 0000000..87d322f --- /dev/null +++ b/tests/after_203_teslas/Round 019/OpponentCommand.txt @@ -0,0 +1 @@ +3,0,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 019/PlayerCommand.txt b/tests/after_203_teslas/Round 019/PlayerCommand.txt new file mode 100644 index 0000000..66780d8 --- /dev/null +++ b/tests/after_203_teslas/Round 019/PlayerCommand.txt @@ -0,0 +1 @@ +3,0,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 020/OpponentCommand.txt b/tests/after_203_teslas/Round 020/OpponentCommand.txt new file mode 100644 index 0000000..95a4cf3 --- /dev/null +++ b/tests/after_203_teslas/Round 020/OpponentCommand.txt @@ -0,0 +1 @@ +0,0,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 020/PlayerCommand.txt b/tests/after_203_teslas/Round 020/PlayerCommand.txt new file mode 100644 index 0000000..a5bd5ef --- /dev/null +++ b/tests/after_203_teslas/Round 020/PlayerCommand.txt @@ -0,0 +1 @@ +1,6,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 021/OpponentCommand.txt b/tests/after_203_teslas/Round 021/OpponentCommand.txt new file mode 100644 index 0000000..ea9e316 --- /dev/null +++ b/tests/after_203_teslas/Round 021/OpponentCommand.txt @@ -0,0 +1 @@ +6,1,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 021/PlayerCommand.txt b/tests/after_203_teslas/Round 021/PlayerCommand.txt new file mode 100644 index 0000000..b557a00 --- /dev/null +++ b/tests/after_203_teslas/Round 021/PlayerCommand.txt @@ -0,0 +1 @@ +4,3,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 022/OpponentCommand.txt b/tests/after_203_teslas/Round 022/OpponentCommand.txt new file mode 100644 index 0000000..88af7ff --- /dev/null +++ b/tests/after_203_teslas/Round 022/OpponentCommand.txt @@ -0,0 +1 @@ +1,4,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 022/PlayerCommand.txt b/tests/after_203_teslas/Round 022/PlayerCommand.txt new file mode 100644 index 0000000..f24e83b --- /dev/null +++ b/tests/after_203_teslas/Round 022/PlayerCommand.txt @@ -0,0 +1 @@ +4,6,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 023/OpponentCommand.txt b/tests/after_203_teslas/Round 023/OpponentCommand.txt new file mode 100644 index 0000000..49dd99d --- /dev/null +++ b/tests/after_203_teslas/Round 023/OpponentCommand.txt @@ -0,0 +1 @@ +1,2,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 023/PlayerCommand.txt b/tests/after_203_teslas/Round 023/PlayerCommand.txt new file mode 100644 index 0000000..49dd99d --- /dev/null +++ b/tests/after_203_teslas/Round 023/PlayerCommand.txt @@ -0,0 +1 @@ +1,2,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 024/OpponentCommand.txt b/tests/after_203_teslas/Round 024/OpponentCommand.txt new file mode 100644 index 0000000..ad5f821 --- /dev/null +++ b/tests/after_203_teslas/Round 024/OpponentCommand.txt @@ -0,0 +1 @@ +7,6,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 024/PlayerCommand.txt b/tests/after_203_teslas/Round 024/PlayerCommand.txt new file mode 100644 index 0000000..19fbb8f --- /dev/null +++ b/tests/after_203_teslas/Round 024/PlayerCommand.txt @@ -0,0 +1 @@ +4,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 025/OpponentCommand.txt b/tests/after_203_teslas/Round 025/OpponentCommand.txt new file mode 100644 index 0000000..533b1c8 --- /dev/null +++ b/tests/after_203_teslas/Round 025/OpponentCommand.txt @@ -0,0 +1 @@ +2,6,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 025/PlayerCommand.txt b/tests/after_203_teslas/Round 025/PlayerCommand.txt new file mode 100644 index 0000000..c7d9109 --- /dev/null +++ b/tests/after_203_teslas/Round 025/PlayerCommand.txt @@ -0,0 +1 @@ +5,2,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 026/OpponentCommand.txt b/tests/after_203_teslas/Round 026/OpponentCommand.txt new file mode 100644 index 0000000..19fbb8f --- /dev/null +++ b/tests/after_203_teslas/Round 026/OpponentCommand.txt @@ -0,0 +1 @@ +4,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 026/PlayerCommand.txt b/tests/after_203_teslas/Round 026/PlayerCommand.txt new file mode 100644 index 0000000..94d7b0a --- /dev/null +++ b/tests/after_203_teslas/Round 026/PlayerCommand.txt @@ -0,0 +1 @@ +6,5,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 027/OpponentCommand.txt b/tests/after_203_teslas/Round 027/OpponentCommand.txt new file mode 100644 index 0000000..50688ac --- /dev/null +++ b/tests/after_203_teslas/Round 027/OpponentCommand.txt @@ -0,0 +1 @@ +6,0,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 027/PlayerCommand.txt b/tests/after_203_teslas/Round 027/PlayerCommand.txt new file mode 100644 index 0000000..7388cff --- /dev/null +++ b/tests/after_203_teslas/Round 027/PlayerCommand.txt @@ -0,0 +1 @@ +4,0,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 028/OpponentCommand.txt b/tests/after_203_teslas/Round 028/OpponentCommand.txt new file mode 100644 index 0000000..412a2df --- /dev/null +++ b/tests/after_203_teslas/Round 028/OpponentCommand.txt @@ -0,0 +1 @@ +7,7,4
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 028/PlayerCommand.txt b/tests/after_203_teslas/Round 028/PlayerCommand.txt new file mode 100644 index 0000000..c27eaf9 --- /dev/null +++ b/tests/after_203_teslas/Round 028/PlayerCommand.txt @@ -0,0 +1 @@ +5,1,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 029/OpponentCommand.txt b/tests/after_203_teslas/Round 029/OpponentCommand.txt new file mode 100644 index 0000000..e61ee5b --- /dev/null +++ b/tests/after_203_teslas/Round 029/OpponentCommand.txt @@ -0,0 +1 @@ +7,5,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 029/PlayerCommand.txt b/tests/after_203_teslas/Round 029/PlayerCommand.txt new file mode 100644 index 0000000..412a2df --- /dev/null +++ b/tests/after_203_teslas/Round 029/PlayerCommand.txt @@ -0,0 +1 @@ +7,7,4
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 030/OpponentCommand.txt b/tests/after_203_teslas/Round 030/OpponentCommand.txt new file mode 100644 index 0000000..b0f2a85 --- /dev/null +++ b/tests/after_203_teslas/Round 030/OpponentCommand.txt @@ -0,0 +1 @@ +6,4,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 030/PlayerCommand.txt b/tests/after_203_teslas/Round 030/PlayerCommand.txt new file mode 100644 index 0000000..4119710 --- /dev/null +++ b/tests/after_203_teslas/Round 030/PlayerCommand.txt @@ -0,0 +1 @@ +2,1,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 031/OpponentCommand.txt b/tests/after_203_teslas/Round 031/OpponentCommand.txt new file mode 100644 index 0000000..94d7b0a --- /dev/null +++ b/tests/after_203_teslas/Round 031/OpponentCommand.txt @@ -0,0 +1 @@ +6,5,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 031/PlayerCommand.txt b/tests/after_203_teslas/Round 031/PlayerCommand.txt new file mode 100644 index 0000000..0b12f52 --- /dev/null +++ b/tests/after_203_teslas/Round 031/PlayerCommand.txt @@ -0,0 +1 @@ +2,4,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 032/OpponentCommand.txt b/tests/after_203_teslas/Round 032/OpponentCommand.txt new file mode 100644 index 0000000..af58f31 --- /dev/null +++ b/tests/after_203_teslas/Round 032/OpponentCommand.txt @@ -0,0 +1 @@ +2,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 032/PlayerCommand.txt b/tests/after_203_teslas/Round 032/PlayerCommand.txt new file mode 100644 index 0000000..72ca43d --- /dev/null +++ b/tests/after_203_teslas/Round 032/PlayerCommand.txt @@ -0,0 +1 @@ +0,5,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 033/OpponentCommand.txt b/tests/after_203_teslas/Round 033/OpponentCommand.txt new file mode 100644 index 0000000..7d08a5b --- /dev/null +++ b/tests/after_203_teslas/Round 033/OpponentCommand.txt @@ -0,0 +1 @@ +3,1,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 033/PlayerCommand.txt b/tests/after_203_teslas/Round 033/PlayerCommand.txt new file mode 100644 index 0000000..f3c8f77 --- /dev/null +++ b/tests/after_203_teslas/Round 033/PlayerCommand.txt @@ -0,0 +1 @@ +2,2,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 034/OpponentCommand.txt b/tests/after_203_teslas/Round 034/OpponentCommand.txt new file mode 100644 index 0000000..b557a00 --- /dev/null +++ b/tests/after_203_teslas/Round 034/OpponentCommand.txt @@ -0,0 +1 @@ +4,3,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 034/PlayerCommand.txt b/tests/after_203_teslas/Round 034/PlayerCommand.txt new file mode 100644 index 0000000..8e935c8 --- /dev/null +++ b/tests/after_203_teslas/Round 034/PlayerCommand.txt @@ -0,0 +1 @@ +6,3,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 035/OpponentCommand.txt b/tests/after_203_teslas/Round 035/OpponentCommand.txt new file mode 100644 index 0000000..3de7cb6 --- /dev/null +++ b/tests/after_203_teslas/Round 035/OpponentCommand.txt @@ -0,0 +1 @@ +7,0,4
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 035/PlayerCommand.txt b/tests/after_203_teslas/Round 035/PlayerCommand.txt new file mode 100644 index 0000000..55526f5 --- /dev/null +++ b/tests/after_203_teslas/Round 035/PlayerCommand.txt @@ -0,0 +1 @@ +1,3,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 036/OpponentCommand.txt b/tests/after_203_teslas/Round 036/OpponentCommand.txt new file mode 100644 index 0000000..b7adddf --- /dev/null +++ b/tests/after_203_teslas/Round 036/OpponentCommand.txt @@ -0,0 +1 @@ +5,4,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 036/PlayerCommand.txt b/tests/after_203_teslas/Round 036/PlayerCommand.txt new file mode 100644 index 0000000..36e6f4c --- /dev/null +++ b/tests/after_203_teslas/Round 036/PlayerCommand.txt @@ -0,0 +1 @@ +7,1,4
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 037/OpponentCommand.txt b/tests/after_203_teslas/Round 037/OpponentCommand.txt new file mode 100644 index 0000000..7388cff --- /dev/null +++ b/tests/after_203_teslas/Round 037/OpponentCommand.txt @@ -0,0 +1 @@ +4,0,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 037/PlayerCommand.txt b/tests/after_203_teslas/Round 037/PlayerCommand.txt new file mode 100644 index 0000000..743727a --- /dev/null +++ b/tests/after_203_teslas/Round 037/PlayerCommand.txt @@ -0,0 +1 @@ +7,6,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 038/OpponentCommand.txt b/tests/after_203_teslas/Round 038/OpponentCommand.txt new file mode 100644 index 0000000..8c5ef78 --- /dev/null +++ b/tests/after_203_teslas/Round 038/OpponentCommand.txt @@ -0,0 +1 @@ +4,4,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 038/PlayerCommand.txt b/tests/after_203_teslas/Round 038/PlayerCommand.txt new file mode 100644 index 0000000..17d7db2 --- /dev/null +++ b/tests/after_203_teslas/Round 038/PlayerCommand.txt @@ -0,0 +1 @@ +5,3,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 039/OpponentCommand.txt b/tests/after_203_teslas/Round 039/OpponentCommand.txt new file mode 100644 index 0000000..6c57709 --- /dev/null +++ b/tests/after_203_teslas/Round 039/OpponentCommand.txt @@ -0,0 +1 @@ +1,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 039/PlayerCommand.txt b/tests/after_203_teslas/Round 039/PlayerCommand.txt new file mode 100644 index 0000000..4dd67d5 --- /dev/null +++ b/tests/after_203_teslas/Round 039/PlayerCommand.txt @@ -0,0 +1 @@ +1,0,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 040/OpponentCommand.txt b/tests/after_203_teslas/Round 040/OpponentCommand.txt new file mode 100644 index 0000000..4dd67d5 --- /dev/null +++ b/tests/after_203_teslas/Round 040/OpponentCommand.txt @@ -0,0 +1 @@ +1,0,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 040/PlayerCommand.txt b/tests/after_203_teslas/Round 040/PlayerCommand.txt new file mode 100644 index 0000000..bdb74d0 --- /dev/null +++ b/tests/after_203_teslas/Round 040/PlayerCommand.txt @@ -0,0 +1 @@ +No Command
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 041/OpponentCommand.txt b/tests/after_203_teslas/Round 041/OpponentCommand.txt new file mode 100644 index 0000000..ad5f821 --- /dev/null +++ b/tests/after_203_teslas/Round 041/OpponentCommand.txt @@ -0,0 +1 @@ +7,6,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 041/PlayerCommand.txt b/tests/after_203_teslas/Round 041/PlayerCommand.txt new file mode 100644 index 0000000..46660d6 --- /dev/null +++ b/tests/after_203_teslas/Round 041/PlayerCommand.txt @@ -0,0 +1 @@ +6,1,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 042/OpponentCommand.txt b/tests/after_203_teslas/Round 042/OpponentCommand.txt new file mode 100644 index 0000000..5c3de37 --- /dev/null +++ b/tests/after_203_teslas/Round 042/OpponentCommand.txt @@ -0,0 +1 @@ +6,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 042/PlayerCommand.txt b/tests/after_203_teslas/Round 042/PlayerCommand.txt new file mode 100644 index 0000000..5c3de37 --- /dev/null +++ b/tests/after_203_teslas/Round 042/PlayerCommand.txt @@ -0,0 +1 @@ +6,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 043/OpponentCommand.txt b/tests/after_203_teslas/Round 043/OpponentCommand.txt new file mode 100644 index 0000000..b77a79c --- /dev/null +++ b/tests/after_203_teslas/Round 043/OpponentCommand.txt @@ -0,0 +1 @@ +2,3,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 043/PlayerCommand.txt b/tests/after_203_teslas/Round 043/PlayerCommand.txt new file mode 100644 index 0000000..d51905f --- /dev/null +++ b/tests/after_203_teslas/Round 043/PlayerCommand.txt @@ -0,0 +1 @@ +7,0,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 044/OpponentCommand.txt b/tests/after_203_teslas/Round 044/OpponentCommand.txt new file mode 100644 index 0000000..1260cea --- /dev/null +++ b/tests/after_203_teslas/Round 044/OpponentCommand.txt @@ -0,0 +1 @@ +5,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 044/PlayerCommand.txt b/tests/after_203_teslas/Round 044/PlayerCommand.txt new file mode 100644 index 0000000..1260cea --- /dev/null +++ b/tests/after_203_teslas/Round 044/PlayerCommand.txt @@ -0,0 +1 @@ +5,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 045/OpponentCommand.txt b/tests/after_203_teslas/Round 045/OpponentCommand.txt new file mode 100644 index 0000000..a7c241f --- /dev/null +++ b/tests/after_203_teslas/Round 045/OpponentCommand.txt @@ -0,0 +1 @@ +0,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 045/PlayerCommand.txt b/tests/after_203_teslas/Round 045/PlayerCommand.txt new file mode 100644 index 0000000..1818e31 --- /dev/null +++ b/tests/after_203_teslas/Round 045/PlayerCommand.txt @@ -0,0 +1 @@ +2,3,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 046/OpponentCommand.txt b/tests/after_203_teslas/Round 046/OpponentCommand.txt new file mode 100644 index 0000000..19fbb8f --- /dev/null +++ b/tests/after_203_teslas/Round 046/OpponentCommand.txt @@ -0,0 +1 @@ +4,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 046/PlayerCommand.txt b/tests/after_203_teslas/Round 046/PlayerCommand.txt new file mode 100644 index 0000000..77bf522 --- /dev/null +++ b/tests/after_203_teslas/Round 046/PlayerCommand.txt @@ -0,0 +1 @@ +3,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 047/OpponentCommand.txt b/tests/after_203_teslas/Round 047/OpponentCommand.txt new file mode 100644 index 0000000..14d635f --- /dev/null +++ b/tests/after_203_teslas/Round 047/OpponentCommand.txt @@ -0,0 +1 @@ +7,4,4
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 047/PlayerCommand.txt b/tests/after_203_teslas/Round 047/PlayerCommand.txt new file mode 100644 index 0000000..722ec58 --- /dev/null +++ b/tests/after_203_teslas/Round 047/PlayerCommand.txt @@ -0,0 +1 @@ +4,2,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 048/OpponentCommand.txt b/tests/after_203_teslas/Round 048/OpponentCommand.txt new file mode 100644 index 0000000..ca8db41 --- /dev/null +++ b/tests/after_203_teslas/Round 048/OpponentCommand.txt @@ -0,0 +1 @@ +3,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 048/PlayerCommand.txt b/tests/after_203_teslas/Round 048/PlayerCommand.txt new file mode 100644 index 0000000..4a9590d --- /dev/null +++ b/tests/after_203_teslas/Round 048/PlayerCommand.txt @@ -0,0 +1 @@ +0,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 049/OpponentCommand.txt b/tests/after_203_teslas/Round 049/OpponentCommand.txt new file mode 100644 index 0000000..9477e06 --- /dev/null +++ b/tests/after_203_teslas/Round 049/OpponentCommand.txt @@ -0,0 +1 @@ +6,6,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 049/PlayerCommand.txt b/tests/after_203_teslas/Round 049/PlayerCommand.txt new file mode 100644 index 0000000..5c88dd1 --- /dev/null +++ b/tests/after_203_teslas/Round 049/PlayerCommand.txt @@ -0,0 +1 @@ +6,6,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 050/OpponentCommand.txt b/tests/after_203_teslas/Round 050/OpponentCommand.txt new file mode 100644 index 0000000..f217f6d --- /dev/null +++ b/tests/after_203_teslas/Round 050/OpponentCommand.txt @@ -0,0 +1 @@ +5,6,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 050/PlayerCommand.txt b/tests/after_203_teslas/Round 050/PlayerCommand.txt new file mode 100644 index 0000000..9f12d31 --- /dev/null +++ b/tests/after_203_teslas/Round 050/PlayerCommand.txt @@ -0,0 +1 @@ +6,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 051/OpponentCommand.txt b/tests/after_203_teslas/Round 051/OpponentCommand.txt new file mode 100644 index 0000000..1260cea --- /dev/null +++ b/tests/after_203_teslas/Round 051/OpponentCommand.txt @@ -0,0 +1 @@ +5,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 051/PlayerCommand.txt b/tests/after_203_teslas/Round 051/PlayerCommand.txt new file mode 100644 index 0000000..1260cea --- /dev/null +++ b/tests/after_203_teslas/Round 051/PlayerCommand.txt @@ -0,0 +1 @@ +5,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 052/OpponentCommand.txt b/tests/after_203_teslas/Round 052/OpponentCommand.txt new file mode 100644 index 0000000..19fbb8f --- /dev/null +++ b/tests/after_203_teslas/Round 052/OpponentCommand.txt @@ -0,0 +1 @@ +4,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 052/PlayerCommand.txt b/tests/after_203_teslas/Round 052/PlayerCommand.txt new file mode 100644 index 0000000..b743516 --- /dev/null +++ b/tests/after_203_teslas/Round 052/PlayerCommand.txt @@ -0,0 +1 @@ +4,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 053/OpponentCommand.txt b/tests/after_203_teslas/Round 053/OpponentCommand.txt new file mode 100644 index 0000000..ca8db41 --- /dev/null +++ b/tests/after_203_teslas/Round 053/OpponentCommand.txt @@ -0,0 +1 @@ +3,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 053/PlayerCommand.txt b/tests/after_203_teslas/Round 053/PlayerCommand.txt new file mode 100644 index 0000000..77bf522 --- /dev/null +++ b/tests/after_203_teslas/Round 053/PlayerCommand.txt @@ -0,0 +1 @@ +3,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 054/OpponentCommand.txt b/tests/after_203_teslas/Round 054/OpponentCommand.txt new file mode 100644 index 0000000..af58f31 --- /dev/null +++ b/tests/after_203_teslas/Round 054/OpponentCommand.txt @@ -0,0 +1 @@ +2,7,2
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 054/PlayerCommand.txt b/tests/after_203_teslas/Round 054/PlayerCommand.txt new file mode 100644 index 0000000..c4e7948 --- /dev/null +++ b/tests/after_203_teslas/Round 054/PlayerCommand.txt @@ -0,0 +1 @@ +2,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 055/OpponentCommand.txt b/tests/after_203_teslas/Round 055/OpponentCommand.txt new file mode 100644 index 0000000..6cf40d9 --- /dev/null +++ b/tests/after_203_teslas/Round 055/OpponentCommand.txt @@ -0,0 +1 @@ +1,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 055/PlayerCommand.txt b/tests/after_203_teslas/Round 055/PlayerCommand.txt new file mode 100644 index 0000000..6cf40d9 --- /dev/null +++ b/tests/after_203_teslas/Round 055/PlayerCommand.txt @@ -0,0 +1 @@ +1,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 056/OpponentCommand.txt b/tests/after_203_teslas/Round 056/OpponentCommand.txt new file mode 100644 index 0000000..a7c241f --- /dev/null +++ b/tests/after_203_teslas/Round 056/OpponentCommand.txt @@ -0,0 +1 @@ +0,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 056/PlayerCommand.txt b/tests/after_203_teslas/Round 056/PlayerCommand.txt new file mode 100644 index 0000000..a7c241f --- /dev/null +++ b/tests/after_203_teslas/Round 056/PlayerCommand.txt @@ -0,0 +1 @@ +0,7,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 057/OpponentCommand.txt b/tests/after_203_teslas/Round 057/OpponentCommand.txt new file mode 100644 index 0000000..743727a --- /dev/null +++ b/tests/after_203_teslas/Round 057/OpponentCommand.txt @@ -0,0 +1 @@ +7,6,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 057/PlayerCommand.txt b/tests/after_203_teslas/Round 057/PlayerCommand.txt new file mode 100644 index 0000000..743727a --- /dev/null +++ b/tests/after_203_teslas/Round 057/PlayerCommand.txt @@ -0,0 +1 @@ +7,6,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 058/OpponentCommand.txt b/tests/after_203_teslas/Round 058/OpponentCommand.txt new file mode 100644 index 0000000..5c88dd1 --- /dev/null +++ b/tests/after_203_teslas/Round 058/OpponentCommand.txt @@ -0,0 +1 @@ +6,6,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 058/PlayerCommand.txt b/tests/after_203_teslas/Round 058/PlayerCommand.txt new file mode 100644 index 0000000..429fd32 --- /dev/null +++ b/tests/after_203_teslas/Round 058/PlayerCommand.txt @@ -0,0 +1 @@ +5,6,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 059/OpponentCommand.txt b/tests/after_203_teslas/Round 059/OpponentCommand.txt new file mode 100644 index 0000000..f24e83b --- /dev/null +++ b/tests/after_203_teslas/Round 059/OpponentCommand.txt @@ -0,0 +1 @@ +4,6,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 059/PlayerCommand.txt b/tests/after_203_teslas/Round 059/PlayerCommand.txt new file mode 100644 index 0000000..f24e83b --- /dev/null +++ b/tests/after_203_teslas/Round 059/PlayerCommand.txt @@ -0,0 +1 @@ +4,6,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 060/OpponentCommand.txt b/tests/after_203_teslas/Round 060/OpponentCommand.txt new file mode 100644 index 0000000..58897af --- /dev/null +++ b/tests/after_203_teslas/Round 060/OpponentCommand.txt @@ -0,0 +1 @@ +3,6,0
\ No newline at end of file diff --git a/tests/after_203_teslas/Round 060/PlayerCommand.txt b/tests/after_203_teslas/Round 060/PlayerCommand.txt new file mode 100644 index 0000000..58897af --- /dev/null +++ b/tests/after_203_teslas/Round 060/PlayerCommand.txt @@ -0,0 +1 @@ +3,6,0
\ No newline at end of file diff --git a/tests/live-comparison.rs b/tests/live-comparison.rs index 711193e..5f87be3 100644 --- a/tests/live-comparison.rs +++ b/tests/live-comparison.rs @@ -13,6 +13,11 @@ fn it_successfully_simulates_replay() { test_from_replay("tests/after_200", 64); } +#[test] +fn it_successfully_simulates_replay_with_teslas() { + test_from_replay("tests/after_203_teslas", 60); +} + fn test_from_replay(replay_folder: &str, length: usize) { let (settings, mut state) = json::read_state_from_file(&format!("{}/Round 000/state.json", replay_folder)).unwrap(); |