public void handType_is_compared_equally_with_self() { var handTypeComparer = new HandTypeComparer(); var result = handTypeComparer.Compare(HandType.FullHouse, HandType.FullHouse); Assert.IsTrue(result == 0); }
public string Result() { int winner = new HandTypeComparer() .Compare(_firstPlayerHand.HandType, _secondPlayerHand.HandType); if (winner > 0) { return ($"{_firstPlayerName} Win, {_handTypeLookup[_firstPlayerHand.HandType]}."); } throw new NotImplementedException(); }
public void fourOfAKind_of_a_kind_is_bigger_than_fullHouse() { var result = new HandTypeComparer().Compare(HandType.FullHouse, HandType.FourOfAKind); Assert.IsTrue(result < 0); }