This commit is contained in:
Dragon Fire
2020-11-22 11:52:40 -05:00
parent bfd26c16f7
commit 3fbb4b89ff
+2 -2
View File
@@ -65,7 +65,7 @@ module.exports = class PokerCommand extends Command {
}); });
} }
let winner = null; let winner = null;
const rotation = players.map(p => p.id); let rotation = players.map(p => p.id);
while (!winner) { while (!winner) {
const bigBlind = players.get(rotation[1]); const bigBlind = players.get(rotation[1]);
bigBlind.money -= bigBlindAmount; bigBlind.money -= bigBlindAmount;
@@ -166,7 +166,7 @@ module.exports = class PokerCommand extends Command {
} }
await this.resetGame(msg, players, deck); await this.resetGame(msg, players, deck);
for (const playerID of rotation) { for (const playerID of rotation) {
if (!players.has(playerID)) removeFromArray(rotation, playerID); if (!players.has(playerID)) rotation = removeFromArray(rotation, playerID);
} }
if (players.size < 2) { if (players.size < 2) {
winner = players.first(); winner = players.first();