diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2018-07-01 18:06:05 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2018-07-01 18:06:05 +0200 |
commit | 26aefe70fa11f209726e5b8a15bd05303726396e (patch) | |
tree | e8ab0ae5fa230e0e1ea6b51b240305d59d59d662 /src/engine/bitwise_engine.rs | |
parent | 1ac0449bd0313ad01da0d253f7b45b45287314b7 (diff) |
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.
Diffstat (limited to 'src/engine/bitwise_engine.rs')
-rw-r--r-- | src/engine/bitwise_engine.rs | 28 |
1 files changed, 14 insertions, 14 deletions
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<UnconstructedBuilding>, - 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<UnconstructedBuilding>, + 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<Point> + pub unoccupied: Vec<Point> } #[derive(Debug, Clone, PartialEq, Eq)] |