UNPKG

poker-variants-odds-calculator

Version:

Fastest and most accurate node module for calculating odds of poker games Texas Hold'em, Texas Shortdeck/Sixplus, Omaha, 5-Card Omaha and 6-Card.

15 lines (14 loc) 473 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function getHighCards(game, cards, suits, num_groups, player_cards, board) { if (game.isOmaha() || game.isOmaha5Cards() || game.isOmaha6Cards()) { player_cards.sortCards(); board.sortCards(); return [ ...player_cards.slice(0, 2), ...board.slice(0, 3) ].sortCards(); } return cards.slice(0, 5); } exports.default = getHighCards;