Poker Odds Calculator
A pre-flop and post-flop odds calculator for Texas Holdem.
Installation
npm install poker-odds-calculator
Console Usage
Pre-flop odds
Let's say that we want to know the odds of 3 pre-flop all-in players holding the following hands: J♥J♤ vs T♢T♤ vs A♧K♧ :
node_modules/.bin/poker-odds-calculator JhJs TdTs AcKc
Post-flop odds
Let's say that we want to know the odds of a player holding the J♢ and the Q♢ against a player with the J♥ and the J♤ on a 7♢9♢T♤ board, with 2 cards to come :
node_modules/.bin/poker-odds-calculator -b 7d9dTs JhJs JdQdnode_modules/.bin/poker-odds-calculator --board 7d9dTs7s JhJs JdQd
-b denotes the board
Short deck
To calculate odds for short deck, override the game variant with -g
node_modules/.bin/poker-odds-calculator -g short -b 7d9dTs JhJs JdQdnode_modules/.bin/poker-odds-calculator --game short --board 7d9dTs7s JhJs JdQd
API Usage
Let's take the previous example, but use the API instead:
; const player1Cards = CardGroup;const player2Cards = CardGroup;const board = CardGroup; const result = OddsCalculator; console;console;
To use Short Deck:
const result = OddsCalculator;
License
This project is licensed under the MIT License - see the LICENSE.md file for details.