1.0.0 • Published 5 years ago

propokertools v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

propokertools

NPM version Downloads

ProPokerTools hand rankings calculator for various poker games, written in JavaScript.

Usage

Install the library with npm install propokertools

import {texasHoldem6, texasHoldem10, omahaHoldem6, omahaHoldem10} from 'propokertools';

console.log(texasHoldem6({hand: ['Ah', 'Ad']})); // <- {percentile: 1}
console.log(texasHoldem6({hand: ['7h', '2d']})); // <- {percentile: 0.01809954751131222}

console.log(texasHoldem10({hand: ['Ah', 'Ad']})); // <- {percentile: 1}
console.log(texasHoldem10({hand: ['7h', '2d']})); // <- {percentile: 0.00904977375565611}

console.log(omahaHoldem6({hand: ['As', 'Ks', 'Ah', 'Kh']})); // <- {percentile: 0.9999113491550466}
console.log(omahaHoldem6({hand: ['As', 'Ah', '7c', '2d']})); // <- {percentile: 0.9578908486471511}

console.log(omahaHoldem10({hand: ['As', 'Ks', 'Ah', 'Kh']})); // <- {percentile: 0.99986702373257}
console.log(omahaHoldem10({hand: ['As', 'Ah', '7c', '2d']})); // <- {percentile: 0.9675316280358297}