Wondering what’s next for npm?Check out our public roadmap! »

    cardplayer-odds-calculator

    1.0.1 • Public • Published

    cardplayer-odds-calculator

    NPM version Downloads

    JavaScript client for Card Player magazine's fast poker odds calculator, which by itself wraps pokenum.

    Usage

    Install the library with npm install cardplayer-odds-calculator

    import OddsCalculator from 'cardplayer-odds-calculator';
     
    const oddsCalculator = new OddsCalculator();
     
    // Example 1: Barry Greenstein vs Tom Dwan (https://www.youtube.com/watch?v=OColG3ceE_Q)
    const odds1 = await oddsCalculator.texasHoldem({holes: [['Ad', 'Ac'], ['Ks', 'Qs']], community: ['4s', '2s', 'Qh'], dead: ['Tc', '5h', 'Jc', '4h', '8d', '2d', 'As', 'Kh', '6h', '3s']});
    console.log(odds1);
    //
    // [ { win: 288, lose: 307, tie: 0, ev: 0.48 },
    //   { win: 307, lose: 288, tie: 0, ev: 0.52 } ]
     
    // Example 2: Patrick Antonius vs Viktor Blom (https://www.youtube.com/watch?v=8en6Jas6bZw)
    const odds2 = await oddsCalculator.omahaHoldem({holes: [['Ah', '3s', 'Ks', 'Kh'], ['6d', '9s', '7d', '8h']], community: ['4s', '5c', '2h']});
    console.log(odds2);
    //
    // [ { win: 448, lose: 372, tie: 0, ev: 0.55 },
    //   { win: 372, lose: 448, tie: 0, ev: 0.45 } ]

    Install

    npm i cardplayer-odds-calculator

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    9.8 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar