summaryrefslogtreecommitdiff
path: root/scripts/gui/lobby.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gui/lobby.js')
-rw-r--r--scripts/gui/lobby.js14
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 = [];
}