From 1175f8b436d15c47fb60866755921fc68183dc72 Mon Sep 17 00:00:00 2001 From: troido Date: Tue, 28 Jan 2020 22:14:39 +0100 Subject: player is now controllable --- src/main.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index ca2947c..c3a02e9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,7 +8,7 @@ pub mod server; pub mod gameserver; pub mod room; pub mod util; -// pub mod controls; +pub mod controls; use self::gameserver::{GameServer, Action}; use self::server::unixserver::UnixServer; @@ -40,7 +40,7 @@ fn main() { match action { Action::Join(name) => {room.add_player(&name);} Action::Leave(name) => {room.remove_player(&name);} - _ => {} + Action::Input(name, control) => {room.control(name, control);} } } room.update(); @@ -67,7 +67,5 @@ fn create_update_message((width, height): (i32, i32), field: Vec, mapping ] ] ]); -// updatemsg[1][0][1]["field"] = json::from(field); -// updatemsg[1][0][1]["mapping"] = json::from(mapping); updatemsg.to_string() } -- cgit