0.0.6 • Published 12 years ago

poker-sim v0.0.6

Weekly downloads
2
License
-
Repository
github
Last release
12 years ago

poker-sim

Node library that simulates a poker game and calculates winning percentages

USAGE:

var pokerSim = require("poker-sim");

var game = new pokerSim.Game();

//add "Hands" or players
game.addHand("Peter").addHand("Darren").addHand("Jim").addHand("Frank");

//Deal two cards (getting fancy with this and trying to add more or less than 2 will probably get you in trouble)
game.dealCard().dealCard();

//call evalHands() to process win percentages using the current state of the game
game.evalHands()

//output the status of the game to the console
game.printGame();

//flop (3 cards)
game.communityCard().communityCard().communityCard();

//eval and print
game.evalHands().printGame();

//turn
game.communityCard();

//eval and print
game.evalHands().printGame();

//river
game.communityCard();

//eval and print
game.evalHands().printGame();

//at any time you can return the JSON of the game status
console.log(game.getGame());

Notes:

Fairly untested, use at own risk or modify and make it better!

0.0.6

12 years ago

0.0.5

12 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago