Kleine Verbesserungen
This commit is contained in:
@@ -14,7 +14,7 @@ class ClientHandler {
|
|||||||
this.socket
|
this.socket
|
||||||
);
|
);
|
||||||
|
|
||||||
this.socket.on("disconnect", () => { this.defaultDisconnect() })
|
this.socket.on("disconnect", () => { this.defaultDisconnect() });
|
||||||
|
|
||||||
this.checkForLobby();
|
this.checkForLobby();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ class Lobby {
|
|||||||
constructor(io, lobbyManager, code) {
|
constructor(io, lobbyManager, code) {
|
||||||
this.io = io;
|
this.io = io;
|
||||||
this.lobbyManager = lobbyManager;
|
this.lobbyManager = lobbyManager;
|
||||||
|
|
||||||
this.code = code;
|
this.code = code;
|
||||||
/** @type {Array<SocketUser>} */
|
/** @type {Array<SocketUser>} */
|
||||||
this.users = [];
|
this.users = [];
|
||||||
@@ -23,7 +24,6 @@ class Lobby {
|
|||||||
this.sendLobbyUserUpdate();
|
this.sendLobbyUserUpdate();
|
||||||
|
|
||||||
if(this.users.length === 2) {
|
if(this.users.length === 2) {
|
||||||
console.log("Starte Spiel");
|
|
||||||
this.startGame();
|
this.startGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class TemporaryLobby{
|
|||||||
this.users = users;
|
this.users = users;
|
||||||
this.lobbyManager = lobbyManager;
|
this.lobbyManager = lobbyManager;
|
||||||
|
|
||||||
setTimeout(this.selfDestroy.bind(this), 5000);
|
setTimeout(this.selfDestroy.bind(this), 4000);
|
||||||
}
|
}
|
||||||
|
|
||||||
selfDestroy(){
|
selfDestroy(){
|
||||||
|
|||||||
Reference in New Issue
Block a user