mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 00:07:36 +02:00
Fix
This commit is contained in:
@@ -3,7 +3,7 @@ const Collection = require('@discordjs/collection');
|
|||||||
const { Hand } = require('pokersolver');
|
const { Hand } = require('pokersolver');
|
||||||
const { stripIndents } = require('common-tags');
|
const { stripIndents } = require('common-tags');
|
||||||
const Deck = require('../../structures/cards/Deck');
|
const Deck = require('../../structures/cards/Deck');
|
||||||
const { formatNumber, list, delay, awaitPlayers } = require('../../util/Util');
|
const { formatNumber, list, delay, awaitPlayers, removeFromArray } = require('../../util/Util');
|
||||||
const max = 6;
|
const max = 6;
|
||||||
const min = 2;
|
const min = 2;
|
||||||
const bigBlindAmount = 100;
|
const bigBlindAmount = 100;
|
||||||
@@ -67,6 +67,10 @@ module.exports = class PokerCommand extends Command {
|
|||||||
let winner = null;
|
let winner = null;
|
||||||
let rotation = players.map(p => p.id);
|
let rotation = players.map(p => p.id);
|
||||||
while (!winner) {
|
while (!winner) {
|
||||||
|
for (const player of players.values()) {
|
||||||
|
if (players.has(player.id)) continue;
|
||||||
|
rotation = removeFromArray(player.id);
|
||||||
|
}
|
||||||
const bigBlind = players.get(rotation[1]);
|
const bigBlind = players.get(rotation[1]);
|
||||||
bigBlind.money -= bigBlindAmount;
|
bigBlind.money -= bigBlindAmount;
|
||||||
bigBlind.currentBet += bigBlindAmount;
|
bigBlind.currentBet += bigBlindAmount;
|
||||||
|
|||||||
Reference in New Issue
Block a user