diff options
| author | troido <troido@protonmail.com> | 2020-02-16 23:25:04 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-16 23:25:04 +0100 |
| commit | c9a11aec577a0927afb4e97f3041b492621ce666 (patch) | |
| tree | d27ab608da72a7b17741a76da37886bd85878b8c /src/controls.rs | |
| parent | 10bf24f99efb87b586590b8785ac8fe337db96e5 (diff) | |
added playerid to avoid stringly typing
Diffstat (limited to 'src/controls.rs')
| -rw-r--r-- | src/controls.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/controls.rs b/src/controls.rs index d9432a5..a27348d 100644 --- a/src/controls.rs +++ b/src/controls.rs @@ -1,7 +1,7 @@ use serde_json::Value; -use super::pos::Pos; +use crate::{PlayerId, Pos}; #[derive(Debug, Clone)] pub enum Direction { @@ -68,8 +68,8 @@ impl Control { #[derive(Debug, Clone)] pub enum Action { - Join(String), - Leave(String), - Input(String, Control) + Join(PlayerId), + Leave(PlayerId), + Input(PlayerId, Control) } |
