From eb3e19cbf1494f2384309dbd1adafed1a5e88790 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 10 May 2021 22:32:30 +0100 Subject: [PATCH] good enough --- TODO | 5 ++++- server/src/lobbies.js | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index e7c03f2..c4777bc 100644 --- a/TODO +++ b/TODO @@ -59,6 +59,9 @@ → Should lobbies persist once game starts? ☐ Bugfixes - ✔ If a user leaves their current game then makes a new one, it's corrupted @done(21-05-10 17:56) + → If a user leaves their current game then makes a new one, it's corrupted → If a user disconnects during a game, the game is irrevokably corrupted → Usually, if a player leaves, it's fine, but if the host leaves. The lobbby is destructed and the logic creates a new game on the spot and they're the only player + → Sometimes it scores words wrong and it requires a restart + → Sometimes it recognises words wrong and it requires a restart + → Sometimes it doesnt pass the turn along and it requires a restart diff --git a/server/src/lobbies.js b/server/src/lobbies.js index 526e385..a249bd1 100644 --- a/server/src/lobbies.js +++ b/server/src/lobbies.js @@ -73,8 +73,7 @@ function IsLobbyReady(lobbyuid) if (!Lobbies[lobbyuid]) return false; // only support 2-4 players // https://en.wikipedia.org/wiki/Scrabble - // TODO: URGENT ADD THIS BACK AFTER TESTING - // if (Lobbies[lobbyuid].players.length <= 1) return false; + if (Lobbies[lobbyuid].players.length <= 1) return false; if (Lobbies[lobbyuid].players.length > 4) return false; return Lobbies[lobbyuid].players.every(e => e.ready);