mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 14:19:11 +02:00
Fix poker not removing players from rotation
This commit is contained in:
@@ -68,9 +68,9 @@ module.exports = class PokerCommand extends Command {
|
|||||||
let winner = null;
|
let winner = null;
|
||||||
const rotation = players.map(p => p.id);
|
const rotation = players.map(p => p.id);
|
||||||
while (!winner) {
|
while (!winner) {
|
||||||
for (const player of players.values()) {
|
for (const player of rotation) {
|
||||||
if (players.has(player.id)) continue;
|
if (players.has(player)) continue;
|
||||||
removeFromArray(rotation, player.id);
|
removeFromArray(rotation, player);
|
||||||
}
|
}
|
||||||
const bigBlind = players.get(rotation[1]);
|
const bigBlind = players.get(rotation[1]);
|
||||||
bigBlind.money -= bigBlindAmount;
|
bigBlind.money -= bigBlindAmount;
|
||||||
|
|||||||
Reference in New Issue
Block a user