rafanoronha / scala-poker

Having fun while coding a brand new open source scala poker library
MIT License
21 stars 12 forks source link

Should recognise straight when there is a pair of cards in the middle of the hand #36

Closed Naktibalda closed 10 years ago

Naktibalda commented 10 years ago

Example "A, K, K, Q, J, 10, 5"

Testcase:

 it("should understand broadway straight when there is a pair of kings") {
    val cards = (Ace, Spades) ::(King, Clubs) ::(King, Hearts) ::
      (Four, Spades) ::(Queen, Clubs) ::(Jack, Clubs) ::(Ten, Clubs) :: Nil

    Hand(cards) should have(
      'ranking(Straight)
    )
  }

I will fix it.

Broadway matching has the same issue.