summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-07-20 12:26:57 -0400
committerKyle Gunger <kgunger12@gmail.com>2022-07-20 12:26:57 -0400
commit50a1c6f8432b541d84a1326ae8515589440a3804 (patch)
tree6403e083f14644c708bdbbea2ebe85e7073535b3
parentbbea4f6d52d59e1ce716e30f4ff710418791d626 (diff)
Preliminary join and leave flags for games
-rw-r--r--scripts/client.js7
1 files changed, 4 insertions, 3 deletions
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", "");
}
}