summaryrefslogtreecommitdiff
path: root/src/controls.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-09 23:38:22 +0100
committertroido <troido@protonmail.com>2020-02-09 23:38:22 +0100
commitb9cfb78c20fd309929aae98f24acc8ba4a9a7481 (patch)
tree898684ce84a06651f78a0973fa1a6d4d2d192cb3 /src/controls.rs
parent105c5ab0c0e969f3fda2cd43ae5195cbdb4da016 (diff)
can now pick up and drop items
Diffstat (limited to 'src/controls.rs')
-rw-r--r--src/controls.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/controls.rs b/src/controls.rs
index 1f96180..d9432a5 100644
--- a/src/controls.rs
+++ b/src/controls.rs
@@ -42,7 +42,8 @@ impl Direction {
#[derive(Debug, Clone)]
pub enum Control {
Move(Direction),
- Take(u64)
+ Take(u64),
+ Drop(u64)
}
@@ -54,10 +55,11 @@ impl Control {
Some(dir) => Some(Control::Move(dir)),
None => None
},
- "take" => match val[1].as_u64() {
+ "take" => Some(Control::Take(0)), /*match val[1].as_u64() {
Some(rank) => Some(Control::Take(rank)),
_ => None
- }
+ }*/
+ "drop" => Some(Control::Drop(0)),
_ => None
}
} else {None}