diff --git a/server.js b/server.js index 563cb62..72f1ca1 100644 --- a/server.js +++ b/server.js @@ -80,7 +80,7 @@ function teamWon(game) { if (wolvesAlive === 0) { return "village" } - if ((wolvesAlive === villagersAlive) && (totalAlive !== 2)) { + if ((wolvesAlive >= villagersAlive) && (totalAlive !== 2)) { return "wolf"; } if (totalAlive === 2) { diff --git a/static/game.js b/static/game.js index 1cf21ef..ceec169 100644 --- a/static/game.js +++ b/static/game.js @@ -115,6 +115,7 @@ function getLiveCount() { } function renderEndSplash() { + clearInterval(clock); document.getElementById("game-container").remove(); document.querySelector("#message-box").style.display = 'none'; currentGame.winningTeam === "village" @@ -209,7 +210,6 @@ function renderDeadAndAliveInformation() { return a.card.role > b.card.role ? 1 : -1; }); let deadPlayers = currentGame.players.filter((player) => player.dead); - console.log(deadPlayers); deadPlayers.sort((a, b) => { // sort players by the time they died return new Date(a.deadAt) > new Date(b.deadAt) ? -1 : 1; });