@botpoker/engine-holdem
Version:
Texas Hold'em poker engine
18 lines (15 loc) • 445 B
JavaScript
;
/**
* Determines whether the current bet loop
* should be interrupted.
* @name shouldInterruptCurrentBetLoop
* @param {Object} gamestate
* @return {Boolean}
*/
const shouldInterruptCurrentBetLoop =
(gamestate) => {
return gamestate.spinCount > 0 &&
gamestate.activePlayers.every((player) =>
player.chipsBet === gamestate.callAmount || player.allin);
};
module.exports = shouldInterruptCurrentBetLoop;