@botpoker/hand
Version:
Evaluate poker hold'em hands
17 lines (12 loc) • 373 B
JavaScript
;
const map = require("../utils/map-rank");
const exclude = require("../utils/exclude-rank");
const strength = require("../domain/ranks");
const threeOfAKind =
(cards, rank) => ({
name: "Three of a kind",
kickers: map(exclude(cards, rank[0])),
rank: rank[0],
strength: strength.get("three-of-a-kind"),
});
module.exports = threeOfAKind;