diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2018-08-09 20:40:03 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2018-08-09 20:40:03 +0200 |
commit | ea78e266cff3f57c39442aefc21295a758419e69 (patch) | |
tree | 8f5f707affbd546efb43b9a638d2f9ff6bd52116 /src/engine/mod.rs | |
parent | f41255a8dda9e2c6a18c32564a30e63eed58f6b3 (diff) |
Removed dynamic settings
It worked really well for round 2 to set constants
Diffstat (limited to 'src/engine/mod.rs')
-rw-r--r-- | src/engine/mod.rs | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/engine/mod.rs b/src/engine/mod.rs index c205d72..f98ef6b 100644 --- a/src/engine/mod.rs +++ b/src/engine/mod.rs @@ -1,38 +1,5 @@ pub mod command; pub mod geometry; -pub mod settings; pub mod bitwise_engine; pub mod constants; - -use self::command::{Command}; -use self::geometry::Point; -use self::settings::{GameSettings}; - -pub trait GameState: Clone + Sync { - fn simulate(&mut self, settings: &GameSettings, player_command: Command, opponent_command: Command) -> GameStatus; - - fn player(&self) -> &Player; - fn opponent(&self) -> &Player; - fn player_has_max_teslas(&self) -> bool; - fn opponent_has_max_teslas(&self) -> bool; - - fn unoccupied_player_cell_count(&self) -> usize; - fn unoccupied_opponent_cell_count(&self) -> usize; - fn location_of_unoccupied_player_cell(&self, i: usize) -> Point; - fn location_of_unoccupied_opponent_cell(&self, i: usize) -> Point; -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum GameStatus { - Continue, - PlayerWon, - OpponentWon, - Draw -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Player { - pub energy: u16, - pub health: u8, - pub energy_generated: u16, -} +pub mod status; |