From 784bb70bf249d181f86db60fdb1ca6768fe74f4d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 21 Feb 2021 17:03:36 -0500 Subject: [PATCH] Fix poker not removing players from rotation --- commands/games-mp/poker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/games-mp/poker.js b/commands/games-mp/poker.js index 908e4ce6..39d0d1ba 100644 --- a/commands/games-mp/poker.js +++ b/commands/games-mp/poker.js @@ -68,9 +68,9 @@ module.exports = class PokerCommand extends Command { let winner = null; const rotation = players.map(p => p.id); while (!winner) { - for (const player of players.values()) { - if (players.has(player.id)) continue; - removeFromArray(rotation, player.id); + for (const player of rotation) { + if (players.has(player)) continue; + removeFromArray(rotation, player); } const bigBlind = players.get(rotation[1]); bigBlind.money -= bigBlindAmount;