public bool Analyze(IEnumerable <HandHistories.Objects.Cards.Card> playerCards, BoardCards boardCards)
        {
            if (playerCards == null || boardCards == null || playerCards.Count() != 2 || boardCards.Count() < 3)
            {
                return(false);
            }

            var allCards = boardCards.ToList();

            allCards.AddRange(playerCards);

            if (!HandAnalyzerHelpers.IsPair(playerCards, 1) || !HandAnalyzerHelpers.IsNofKind(allCards, 3))
            {
                return(false);
            }

            var secondBoardCardRank = boardCards.OrderByDescending(x => x.RankNumericValue).ElementAt(1).RankNumericValue;

            if (playerCards.Any(x => x.RankNumericValue == secondBoardCardRank))
            {
                return(true);
            }

            return(false);
        }
        public bool Analyze(IEnumerable <HandHistories.Objects.Cards.Card> playerCards, BoardCards boardCards)
        {
            if (playerCards == null || boardCards == null || playerCards.Count() != 2 || boardCards.Count() < 2)
            {
                return(false);
            }

            if (!HandAnalyzerHelpers.IsPair(playerCards, 1))
            {
                return(false);
            }

            var allCards = boardCards.ToList();

            allCards.AddRange(playerCards);

            var pairs = allCards.GroupBy(x => x.RankNumericValue).Where(x => x.Count() == 2);

            if (pairs != null && pairs.Count() > 1)
            {
                return(playerCards.First().RankNumericValue > boardCards.Max(x => x.RankNumericValue));
            }

            return(false);
        }
        public bool Analyze(IEnumerable <HandHistories.Objects.Cards.Card> playerCards, BoardCards boardCards)
        {
            if (playerCards == null || boardCards == null || playerCards.Count() != 2 || boardCards.Count() < 3)
            {
                return(false);
            }

            var allCards = boardCards.ToList();

            allCards.AddRange(playerCards);

            if (HandAnalyzerHelpers.IsPair(playerCards, 1) || !HandAnalyzerHelpers.IsNofKind(allCards, 3))
            {
                return(false);
            }

            var flopCards = boardCards.GetBoardOnStreet(Street.Flop);
            var flopPair  = boardCards.GroupBy(x => x.Rank).FirstOrDefault(x => x.Count() == 2);

            if (flopPair != null)
            {
                return(flopPair.Any(f => playerCards.Any(p => p.CardIntValue == f.CardIntValue)));
            }

            return(false);
        }
        public bool Analyze(IEnumerable <HandHistories.Objects.Cards.Card> playerCards, BoardCards boardCards)
        {
            if (playerCards == null || boardCards == null || playerCards.Count() != 2 || boardCards.Count() < 3)
            {
                return(false);
            }

            var allCards = boardCards.ToList();

            allCards.AddRange(playerCards);

            if (HandAnalyzerHelpers.IsPair(playerCards, 1) || !HandAnalyzerHelpers.IsNofKind(allCards, 3) || HandAnalyzerHelpers.IsNofKind(boardCards, 3))
            {
                return(false);
            }

            var kicker = playerCards.FirstOrDefault(p => !boardCards.Any(b => b.Rank == p.Rank));

            if (kicker != null)
            {
                return(HandAnalyzerHelpers.IsWeakKicker(kicker));
            }

            return(false);
        }
        public bool Analyze(IEnumerable <HandHistories.Objects.Cards.Card> playerCards, BoardCards boardCards)
        {
            if (playerCards == null || boardCards == null || playerCards.Count() != 2 || boardCards.Count() < 3)
            {
                return(false);
            }

            var allCards = boardCards.ToList();

            allCards.AddRange(playerCards);

            if (HandAnalyzerHelpers.IsPair(playerCards, 1) || HandAnalyzerHelpers.IsNofKind(boardCards, 3) || !HandAnalyzerHelpers.IsNofKind(allCards, 3))
            {
                return(false);
            }

            var secondSetCard = boardCards.OrderByDescending(x => x.RankNumericValue).ElementAt(1);

            if (boardCards.Count(x => x.RankNumericValue == secondSetCard.RankNumericValue) == 2 &&
                playerCards.Any(x => x.RankNumericValue == secondSetCard.RankNumericValue))
            {
                var kicker = playerCards.FirstOrDefault(p => !boardCards.Any(b => b.Rank == p.Rank));
                if (kicker != null)
                {
                    return(HandAnalyzerHelpers.IsWeakKicker(kicker));
                }
            }

            return(false);
        }
        public bool Analyze(IEnumerable <HandHistories.Objects.Cards.Card> playerCards, BoardCards boardCards)
        {
            if (playerCards == null || boardCards == null || playerCards.Count() != 2 || boardCards.Count() < 3)
            {
                return(false);
            }

            var allCards = boardCards.ToList();

            allCards.AddRange(playerCards);

            if (HandAnalyzerHelpers.IsPair(playerCards, 1) || HandAnalyzerHelpers.IsNofKind(boardCards, 3) || !HandAnalyzerHelpers.IsNofKind(allCards, 3))
            {
                return(false);
            }

            bool isThreeOfAKind = boardCards.Where(x => x.RankNumericValue == playerCards.ElementAt(0).RankNumericValue).Count() == 2 ||
                                  boardCards.Where(x => x.RankNumericValue == playerCards.ElementAt(1).RankNumericValue).Count() == 2;

            if (isThreeOfAKind)
            {
                var kicker = playerCards.FirstOrDefault(p => !boardCards.Any(b => b.Rank == p.Rank));
                if (kicker != null)
                {
                    return(HandAnalyzerHelpers.IsDecentKicker(kicker));
                }
            }

            return(false);
        }
        public bool Analyze(IEnumerable <HandHistories.Objects.Cards.Card> playerCards, BoardCards boardCards)
        {
            if (playerCards == null || boardCards == null || playerCards.Count() != 2 || boardCards.Count() < 3)
            {
                return(false);
            }

            var allCards = boardCards.ToList();

            allCards.AddRange(playerCards);

            if (!HandAnalyzerHelpers.IsPair(playerCards, 1) || !HandAnalyzerHelpers.IsNofKind(allCards, 3))
            {
                return(false);
            }

            var bottomBoardCardRank = boardCards.Min(x => x.RankNumericValue);

            if (playerCards.Any(x => x.RankNumericValue == bottomBoardCardRank))
            {
                return(true);
            }

            return(false);
        }
        public virtual bool Analyze(IEnumerable <HandHistories.Objects.Cards.Card> playerCards, BoardCards boardCards)
        {
            if (playerCards == null || boardCards == null)
            {
                return(false);
            }

            var allCards = boardCards.ToList();

            allCards.AddRange(playerCards);

            if (!HandAnalyzerHelpers.IsPair(allCards, 1) && !HandAnalyzerHelpers.IsPair(allCards, 2) && !HandAnalyzerHelpers.IsNofKind(allCards, 3) && !HandAnalyzerHelpers.IsNofKind(allCards, 4))
            {
                if (!allCards.GroupBy(x => x.Suit).Any(x => x.Count() >= 5))
                {
                    return(true);
                }
            }

            return(false);
        }