Beispiel #1
0
        public void handranker_testhands_ranking(string communityCards, string playerCards, HandTypes ranking)
        {
            Hand     hand       = new Hand(communityCards, playerCards);
            HandRank handRanker = new HandRank();

            handRanker.Run(hand);

            Assert.That(handRanker.Ranking, Is.EqualTo(ranking));
        }
        private void SetRankings()
        {
            List <HandRank> rankings = new List <HandRank>();

            foreach (Hand hand in _hands)
            {
                HandRank handRank = new HandRank();
                handRank.Run(hand);
                rankings.Add(handRank);
            }
            _rankings = rankings.OrderByDescending(r => r.Ranking)
                        .ThenByDescending(r => r.HighCard)
                        .ToList();
        }