diff options
| author | troido <troido@protonmail.com> | 2020-01-31 00:51:48 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-01-31 00:51:48 +0100 |
| commit | 5e414fb932eee5aa90d2181cada3c6cd32e4ec09 (patch) | |
| tree | 8d9fd198525e0c52fcd43e03215d3a377d84d97c /src/controls.rs | |
| parent | 286be37225b5de1fb438db0a4029fd391b35c13e (diff) | |
systems can create entities (sort of)
Diffstat (limited to 'src/controls.rs')
| -rw-r--r-- | src/controls.rs | 12 |
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) +} + |
