UNPKG

@botpoker/engine-holdem

Version:
18 lines (15 loc) 445 B
"use strict"; /** * 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;