From c9a11aec577a0927afb4e97f3041b492621ce666 Mon Sep 17 00:00:00 2001 From: troido Date: Sun, 16 Feb 2020 23:25:04 +0100 Subject: added playerid to avoid stringly typing --- src/controls.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/controls.rs') 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) } -- cgit