From 50a1c6f8432b541d84a1326ae8515589440a3804 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Wed, 20 Jul 2022 12:26:57 -0400 Subject: Preliminary join and leave flags for games --- scripts/client.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/client.js b/scripts/client.js index 77b12b8..42ca5be 100644 --- a/scripts/client.js +++ b/scripts/client.js @@ -157,14 +157,15 @@ class Client{ this.socket.init(); } - joinGame(id) + joinGame(id, pass = "") { - this.table.openTable(); + this.lobby.setState("Joining...", "loading", this.socket.server); + this.socket.send("join", {id: id, pass: pass}); } leaveGame() { - + this.socket.send("leave", ""); } } -- cgit v1.2.3