summaryrefslogtreecommitdiff
path: root/src/controls.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls.rs')
-rw-r--r--src/controls.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/controls.rs b/src/controls.rs
index 6ba7539..5cf6d4f 100644
--- a/src/controls.rs
+++ b/src/controls.rs
@@ -3,7 +3,7 @@
use serde_json::Value;
use super::components::Position;
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub enum Direction {
North,
South,
@@ -39,7 +39,7 @@ impl Direction {
}
}
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub enum Control {
Move(Direction),
Take(u64)
@@ -63,3 +63,11 @@ impl Control {
} else {None}
}
}
+
+#[derive(Debug, Clone)]
+pub enum Action {
+ Join(String),
+ Leave(String),
+ Input(String, Control)
+}
+