sbnb / poker-js

A poker library written in JavaScript
MIT License
16 stars 6 forks source link

[Question] - poker.js for Texas Holdem? #1

Open madclouds opened 9 years ago

madclouds commented 9 years ago

Thanks for the article and .js!

I was wondering if it was possible to adapt this for Texas Holdem? When I check for winners using 7 cards in a hand - I always just get a high card.

sbnb commented 9 years ago

Hi Erik,

The code as is only handles 5 card hands. But you could certainly adapt it to a community card game like Holdem. The simplest way would be to write code that comes up with each of the possible 5 card variations of a 7 card hand. Then plug each of those into POKER.getWinners() to find the best.

Cheers, Sean

On 6 January 2015 at 03:31, Erik Bye notifications@github.com wrote:

Thanks for the article and .js!

I was wondering if it was possible to adapt this for Texas Holdem? When I check for winners using 7 cards in a hand - I always just get a high card.

— Reply to this email directly or view it on GitHub https://github.com/sbnb/poker-js/issues/1.