Skip to content

Support for 7-card hands #8

Description

@garbo999

I wonder if ruby-poker was designed to support 7-card hands (2-card hand + 5-card board, like in Texas Holdem)?

The gems does seem to support 7-card hands. But then I came across this case, which appears incorrect:

> hand1 = PokerHand.new("TS TH 2S 3S 2H 3H 3D") # i.e. = 3S 3H 3D TS TH
> hand2 = PokerHand.new("9S 9H 2S 3S 2H 3H 3D") # i.e. = 3S 3H 3D 9S 9H

> hand1.rank
 => "Full house" 
> hand2.rank
 => "Full house" 

> hand1 > hand2
 => false # but should be true?

> hand1 == hand2
 => true # but should not be a tie?

I should mention that I have been using ruby-poker to test my own program. So far it has behaved perfectly, but I wonder about this one case. :-)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions