public void ShouldSayHightestPossibleHand(string hand, int handQuality)
        {
            Hand     theHand  = new Hand(hand);
            BestHand bestHand = new BestHand();
            var      result   = bestHand.FindBestHand(theHand);

            Assert.That(result, Is.EqualTo(handQuality));
        }
Exemple #2
0
        public string GetWinningHand(Hand playerOneCards, Hand playerTwoCards)
        {
            BestHand playerOneBestHand  = new BestHand();
            BestHand playerTwoBestHand  = new BestHand();
            var      playerOneHandValue = playerOneBestHand.FindBestHand(playerOneCards);
            var      playerTwoHandValue = playerTwoBestHand.FindBestHand(playerTwoCards);

            if (playerOneHandValue == playerTwoHandValue)
            {
                return("It is a draw");
            }
            if (playerOneHandValue > playerTwoHandValue)
            {
                return("Player One Wins");
            }
            return("Player Two Wins");
        }