From 26aefe70fa11f209726e5b8a15bd05303726396e Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Sun, 1 Jul 2018 18:06:05 +0200 Subject: Set up (failing) property test for working of new game state Unfortunately, for this test to work, I still need to implement the function that reads the game state and goes from one to the other. --- src/engine/bitwise_engine.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/engine') diff --git a/src/engine/bitwise_engine.rs b/src/engine/bitwise_engine.rs index ca9cf00..bb1dd76 100644 --- a/src/engine/bitwise_engine.rs +++ b/src/engine/bitwise_engine.rs @@ -14,25 +14,25 @@ const MAX_TESLAS: usize = 2; #[derive(Debug, Clone, PartialEq, Eq)] pub struct BitwiseGameState { - status: GameStatus, - player: Player, - opponent: Player, - player_buildings: PlayerBuildings, - opponent_buildings: PlayerBuildings, + pub status: GameStatus, + pub player: Player, + pub opponent: Player, + pub player_buildings: PlayerBuildings, + pub opponent_buildings: PlayerBuildings, } #[derive(Debug, Clone, PartialEq, Eq)] -struct PlayerBuildings { - unconstructed: Vec, - energy_towers: [u8; MAP_HEIGHT], - missile_towers: [[u8; MAP_HEIGHT]; MISSILE_COOLDOWN], - defence_towers: [[u8; MAP_HEIGHT]; DEFENCE_HEALTH], - tesla_towers: [u8; MAP_HEIGHT], +pub struct PlayerBuildings { + pub unconstructed: Vec, + pub buildings: [u64; DEFENCE_HEALTH], - missiles: [[u16; MAP_HEIGHT]; MAP_WIDTH/4], - tesla_cooldowns: [TeslaCooldown; MAX_TESLAS], + pub energy_towers: u64, + pub missile_towers: [u64; MISSILE_COOLDOWN], + + pub missiles: [(u64, u64); MAP_WIDTH/4], + pub tesla_cooldowns: [TeslaCooldown; MAX_TESLAS], - unoccupied: Vec + pub unoccupied: Vec } #[derive(Debug, Clone, PartialEq, Eq)] -- cgit v1.2.3