Closed Naktibalda closed 10 years ago
@Naktibalda have a look at https://github.com/scala/scala/blob/master/src/library/scala/math/Ordered.scala
def > (that: A): Boolean = (this compare that) > 0
Is just a syntactic sugar, so if I didn't miss anything it seems this is what you are looking for:
(diamondRoyalFlush compare clubRoyalFlush) should be(0)
Hi, I am on holiday this week, I will look at it on Saturday. On 13 Jan 2014 18:51, "rafanoronha" notifications@github.com wrote:
@Naktibalda https://github.com/Naktibalda have a look at https://github.com/scala/scala/blob/master/src/library/scala/math/Ordered.scala
def > (that: A): Boolean = (this compare that) > 0
Is just a syntactic sugar, so if I didn't miss anything it seems this is what you are looking for:
(diamondRoyalFlush compare clubRoyalFlush) should be(0)
— Reply to this email directly or view it on GitHubhttps://github.com/rafanoronha/scala-poker/pull/38#issuecomment-32193043 .
I implemented equals methods and hands can be compared with hand1 should equal(hand2)
I implemented tie breaking rules, but how do I test equality of two hands?