1.2.2 • Published 3 days ago

unknown-poker v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 days ago

unknown-poker

Latest Stable Version

Poker odds calculator with support for unknown cards. Uses a modified monte carlo simulation from omni calculator (https://www.omnicalculator.com/other/poker-odds) and poker-solver (https://github.com/goldfire/pokersolver/). Not the fastest thing in the world but it gets the job done.

Usage

import { TexasHoldem } from "unknown-poker";

const table = new TexasHoldem();

// optionally set the number of simulation cycles for the monte carlo algorithm
// const table = new TexasHoldem(5000);

// set the table's cards (can be empty or have cards in it)
table.setTable([]);

// must always set the player's hand
table.setPlayer(["Ah", "Kh"]);

// opponent hands can be empty
table.addOpponent([]);

// or have cards in them
table.addOpponent(["2s", "4c"]);

// mark opponents as having folded in the optional js object
// this will mark the supplied cards as "dead"
table.addOpponent([], {
  folded: true,
});

// you can also add names to your opponents to make them easier to identify in the results
table.addOpponent([], {
  name: "bruh2",
});

const results = table.calculate();
console.log(results);
1.2.0

3 days ago

1.2.2

3 days ago

1.2.1

3 days ago

1.1.1

9 days ago

1.1.0

16 days ago

1.0.3

16 days ago

1.0.2

16 days ago

1.0.1

16 days ago

1.0.0

16 days ago