Esempio n. 1
0
        private Dictionary <Guid, IBestPossibleHand> GetPlayersBestHand(IDictionary <Guid, IPlayerHoleCards> players, IList <ICard> communityCards)
        {
            var bestHands = new Dictionary <Guid, IBestPossibleHand>();

            foreach (var p in players)
            {
                var best = investigator.LocateBestHand(p.Value.HoleCards, communityCards);
                bestHands.Add(p.Key, best);
            }

            return(bestHands);
        }
        public void PairShouldBeDetected()
        {
            IEnumerable <ICard> theHoleCards      = CreateNewHoleCards(TestData.DiamondNine, TestData.DiamondKing);
            IEnumerable <ICard> theCommunityCards = CreateCommunityCards(TestData.ClubNine, TestData.HeartTwo, TestData.SpadeSix, TestData.HeartFour, TestData.HeartFive);

            IBestPossibleHand result = investigator.LocateBestHand(theHoleCards, theCommunityCards);

            Assert.AreEqual(HandName.Pair, result.HandName);
        }