summaryrefslogtreecommitdiff
path: root/src/math.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@gmail.com>2017-05-14 21:49:48 +0200
committerJustin Worthe <justin.worthe@gmail.com>2017-05-14 21:49:48 +0200
commit10c8ceb168e86a58e38086691ddd519bac63ff03 (patch)
treea40b433e7cfad492a60b37c5a337758ffe7d1786 /src/math.rs
parent25a551316e27f4cc52c160d099db9cc3673b3421 (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/math.rs')
-rw-r--r--src/math.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math.rs b/src/math.rs
index 8e81348..3d8a976 100644
--- a/src/math.rs
+++ b/src/math.rs
@@ -2,7 +2,7 @@ use std::fmt;
use rand;
use rand::distributions::{IndependentSample, Range};
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Serialize, Deserialize)]
pub enum Direction {
North,
East,
@@ -40,7 +40,7 @@ impl Direction {
}
}
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Serialize, Deserialize)]
pub struct Point {
pub x: u16,
pub y: u16