diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-07-20 10:58:42 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-07-20 10:58:42 -0400 |
commit | 68db9abc7a02c78a0f170003c32d1fcd796eb212 (patch) | |
tree | 602e9be8f4641991a9666315426a8ca10807c78c /scripts/gui/lobby.js | |
parent | 5207f04d5b775bf4805d83c81aaad1cfcf3fe68a (diff) |
Replace var with let + visual tweaks
- Replace var with let in most of my code
- No longer bring cards to forfront of deck when hovering
- Tweaks for dropdown selector input
Diffstat (limited to 'scripts/gui/lobby.js')
-rw-r--r-- | scripts/gui/lobby.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/scripts/gui/lobby.js b/scripts/gui/lobby.js index 4907f41..85855b6 100644 --- a/scripts/gui/lobby.js +++ b/scripts/gui/lobby.js @@ -53,10 +53,6 @@ class TopBar{ class Game { constructor(options = {id: 0, name: "", password: false}, el) { - this.getID = function () { - return options.id; - } - this.getName = function () { return options.name; } @@ -74,10 +70,6 @@ class Game { join.addEventListener("click", game.joinGame.bind(game, options.id)); e.appendChild(join); - this.hasPassword = function () { - return options.password; - } - if(usePass) { let pass = MakeInput.textInput("", "Game password"); pass.classList.add("pass"); @@ -89,6 +81,10 @@ class Game { } el.appendChild(e); + + this.remove = function () { + e.remove(); + } } } @@ -124,7 +120,7 @@ class Lobby { this.init = false; this.online = []; - this.games = []; + this.games = {}; this.packs = []; } |