summaryrefslogtreecommitdiff
path: root/scripts/client.js
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2021-10-15 21:01:22 -0400
committerKyle Gunger <kgunger12@gmail.com>2021-10-15 21:01:22 -0400
commit6c4896d3aa9d618f024b54c8d51f25ca3f625744 (patch)
treea70ceb0b6d477141e7791b21cb6eaa79316529df /scripts/client.js
parentfcf01353f94b11b8ca6db8ead14d2ec89a0275f4 (diff)
[Themes] Theme selection and small fixes
Diffstat (limited to 'scripts/client.js')
-rw-r--r--scripts/client.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/client.js b/scripts/client.js
index 7f98c7b..07e2fce 100644
--- a/scripts/client.js
+++ b/scripts/client.js
@@ -55,6 +55,7 @@ class Client{
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.chat.bind(this));
this.lobby = new Lobby(document.getElementsByClassName("lobby")[0], this.socket);
@@ -63,8 +64,8 @@ class Client{
this.table = new Table(document.getElementsByClassName("table")[0], this.drag, this.socket);
this.chat = new Chat(document.getElementsByClassName("chat")[0], this.socket);
- this.chat.addChannel("global");
- this.chat.switchChannel("global");
+ this.chat.addChannel("Global");
+ this.chat.switchChannel("Global");
this.settings = new Settings(DefaultUserOps);
this.settings.putSettings(this.lobby.e.settings);
@@ -164,7 +165,9 @@ class Client{
game (m)
{
switch (m.type) {
-
+ case "move":
+ this.table.moveByID(m.data.card, m.data.deck, m.data.pos);
+ break;
}
}