Fix poker not removing players from rotation

This commit is contained in:
Dragon Fire
2021-02-21 17:03:36 -05:00
parent 1d38465ef0
commit 784bb70bf2
+3 -3
View File
@@ -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;