From 6c4896d3aa9d618f024b54c8d51f25ca3f625744 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Fri, 15 Oct 2021 21:01:22 -0400 Subject: [Themes] Theme selection and small fixes --- scripts/client.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts/client.js') 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; } } -- cgit v1.2.3