diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2017-05-14 21:49:48 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2017-05-14 21:49:48 +0200 |
commit | 10c8ceb168e86a58e38086691ddd519bac63ff03 (patch) | |
tree | a40b433e7cfad492a60b37c5a337758ffe7d1786 /src/actions.rs | |
parent | 25a551316e27f4cc52c160d099db9cc3673b3421 (diff) |
Added model for knowledge of the game's state
Will be useful to track deductions that have already been made.
Diffstat (limited to 'src/actions.rs')
-rw-r--r-- | src/actions.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/actions.rs b/src/actions.rs index 1b6400d..9009099 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -5,7 +5,7 @@ use std::fmt; use std::collections::HashSet; -#[derive(Clone, PartialEq, Eq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] pub enum Action { PlaceShips(Vec<ShipPlacement>), Shoot(Point) @@ -22,7 +22,7 @@ impl fmt::Display for Action { } } -#[derive(Clone, PartialEq, Eq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] pub struct ShipPlacement { ship_type: Ship, point: Point, |