Exemplo n.º 1
0
        protected override string CompareSameType(DescendingHandCards whiteCards, DescendingHandCards blackCards)
        {
            var whiteFullHouseCard = whiteCards.GetSameNumberCardByCount(4);
            var blackFullHouseCard = blackCards.GetSameNumberCardByCount(4);

            var compareResult = whiteFullHouseCard.CompareWith(blackFullHouseCard);

            HasResult = true;

            return(compareResult.Equals(StringConstant.TIE) ? StringConstant.CHEAT : compareResult);
        }
Exemplo n.º 2
0
        protected override string CompareSameType(DescendingHandCards whiteCards, DescendingHandCards blackCards)
        {
            var whitePair = whiteCards.GetSameNumberCardByCount(2);
            var blackPair = blackCards.GetSameNumberCardByCount(2);

            var compareResult = whitePair.CompareWith(blackPair);

            HasResult = true;

            if (!compareResult.Equals(StringConstant.TIE))
            {
                return(compareResult);
            }

            var whiteSingleCards = whiteCards.GetSingleCards();
            var blackSingleCards = blackCards.GetSingleCards();

            return(whiteSingleCards.CompareWith(blackSingleCards));
        }