Exemplo n.º 1
0
        private string CheckForAFlush()
        {
            var firstFlushRankValue  = evaluator.FlushValue(firstPlayerCards);
            var secondFlushRankValue = evaluator.FlushValue(secondPlayerCards);

            if (firstFlushRankValue > secondFlushRankValue)
            {
                return(string.Format("{0} wins - flush", firstPlayerName));
            }
            if (firstFlushRankValue < secondFlushRankValue)
            {
                return(string.Format("{0} wins - flush", secondPlayerName));
            }
            return(firstFlushRankValue != Constants.NO_VALUE ? "Tie" : Constants.NO_RESULT);
        }