summaryrefslogtreecommitdiff
path: root/scripts/client.js
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-07-17 20:17:28 -0400
committerKyle Gunger <kgunger12@gmail.com>2022-07-17 20:17:28 -0400
commitc9edb73751d20bb3c09b406895ca6982b455c9e4 (patch)
treec6cca364d2612db9bda4776ea19d8856fa29c92d /scripts/client.js
parent0e010b53fbaa243760f5aabd8ad5ed85c87243fd (diff)
Some fixes
Diffstat (limited to 'scripts/client.js')
-rw-r--r--scripts/client.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/client.js b/scripts/client.js
index 21b3157..9ce9a07 100644
--- a/scripts/client.js
+++ b/scripts/client.js
@@ -48,9 +48,9 @@ class Client{
this.socket.addEventListener("error", this.socketError.bind(this));
this.socket.addEventListener("closed", this.socketClose.bind(this));
this.socket.addEventListener("handshake", this.handshake.bind(this));
- this.socket.addEventListener("menu", this.menu.bind(this));
- this.socket.addEventListener("game", this.game.bind(this));
- this.socket.addEventListener("chat", this.msg.bind(this));
+ this.socket.addEventListener("menu", this.menuMsg.bind(this));
+ this.socket.addEventListener("game", this.gameMsg.bind(this));
+ this.socket.addEventListener("chat", this.chatMsg.bind(this));
this.lobby = new Lobby(document.getElementsByClassName("lobby")[0], this.socket);
@@ -128,21 +128,21 @@ class Client{
}
// Menu switch, called when in the lobby and a message arrives from the server
- menu (e)
+ menuMsg (e)
{
let m = e.detail;
this.lobby[m.type](m.data);
}
// Game switch, called when in game and a message arrives from the server
- game (e)
+ gameMsg (e)
{
let m = e.detail;
this.table[m.type](m.data);
}
// Callback when a chat event is recieved from the server
- msg (e)
+ chatMsg (e)
{
let m = e.detail;
this.chat[m.type](m.data);