goldfire / pokersolver

Javascript poker hand solver.
MIT License
373 stars 93 forks source link

isPossible === true with duplicate cards #14

Closed fvilers closed 4 years ago

fvilers commented 6 years ago

Hi, I'm poking around with the library and making a few tests before using it. If I solve a handle with two duplicate cards (Queen of diamond for example) the returning structure still has a isPossible flag to true. Shouldn't it be false?

goldfire commented 6 years ago

The library assumes that a valid deck has been used, so there aren't any checks for something like that at the moment.

fvilers commented 6 years ago

OK, I undestand. But what's the purpose of the isPossible flag then?

goldfire commented 6 years ago

It is really just an internal variable that could probably be named better to check if a hand type should be solved for (this is why it isn't listed in the docs).