diff options
| author | troido <troido@protonmail.com> | 2020-01-28 22:14:39 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-01-28 22:14:39 +0100 |
| commit | 1175f8b436d15c47fb60866755921fc68183dc72 (patch) | |
| tree | fb4fd4c563a72ecd264823a8d47dc519c312d03d /src/main.rs | |
| parent | 3280e0bf472f418f1b4f209b1355fcaa1db163c6 (diff) | |
player is now controllable
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 2 insertions, 4 deletions
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<usize>, mapping ] ] ]); -// updatemsg[1][0][1]["field"] = json::from(field); -// updatemsg[1][0][1]["mapping"] = json::from(mapping); updatemsg.to_string() } |
