UNPKG

poker-odds-calculator

Version:

A pre-flop and post-flop odds calculator for Texas Holdem

55 lines 1.48 kB
/** * Game Variant Specfic Classes */ import { Rank } from './Card.js'; export class FullDeckRank extends Rank { all() { return [ Rank.TWO, Rank.THREE, Rank.FOUR, Rank.FIVE, Rank.SIX, Rank.SEVEN, Rank.EIGHT, Rank.NINE, Rank.TEN, Rank.JACK, Rank.QUEEN, Rank.KING, Rank.ACE ]; } } export class FullDeckGame { constructor() { this.HIGH_CARD = 1; this.PAIR = 2; this.TWO_PAIRS = 3; this.TRIPS = 4; this.STRAIGHT = 5; this.FLUSH = 6; this.FULL_HOUSE = 7; this.QUADS = 8; this.STRAIGHT_FLUSH = 9; this.FLUSH_BEATS_FULLHOUSE = false; this.A6789_STRAIGHT = false; this.A2345_STRAIGHT = true; this.rank = new FullDeckRank(); } } export class ShortDeckRank extends Rank { all() { return [ Rank.SIX, Rank.SEVEN, Rank.EIGHT, Rank.NINE, Rank.TEN, Rank.JACK, Rank.QUEEN, Rank.KING, Rank.ACE ]; } } export class ShortDeckGame { constructor() { this.HIGH_CARD = 1; this.PAIR = 2; this.TWO_PAIRS = 3; this.TRIPS = 4; this.STRAIGHT = 5; this.FLUSH = 7; this.FULL_HOUSE = 6; this.QUADS = 8; this.STRAIGHT_FLUSH = 9; this.FLUSH_BEATS_FULLHOUSE = true; this.A6789_STRAIGHT = true; this.A2345_STRAIGHT = false; this.rank = new ShortDeckRank(); } } //# sourceMappingURL=Game.js.map