Exemple #1
0
        public override ColumnType Categorize(Card card)
        {
            if (DoneToday(card))
            {
                return(ColumnType.colDone);
            }

            return(Next.Categorize(card));
        }
Exemple #2
0
        public override ColumnType Categorize(Card card)
        {
            if (SkippedToday(card))
            {
                return(ColumnType.colSkip);
            }

            return(Next.Categorize(card));
        }
Exemple #3
0
        public override ColumnType Categorize(Card card)
        {
            if (CouldDoToday(card))
            {
                return(ColumnType.colCould);
            }

            return(Next.Categorize(card));
        }
Exemple #4
0
        public override HandRanking Categorize(Hand hand)
        {
            if (Next == null)
            {
                throw new InvalidOperationException();
            }

            if (hand.HasFlush())
            {
                return(HandRanking.Flush);
            }
            return(Next.Categorize(hand));
        }
Exemple #5
0
        public override HandRanking Categorize(Hand hand)
        {
            if (Next == null)
            {
                throw new InvalidOperationException();
            }

            if (hand.HasNoOfKind(3))
            {
                return(HandRanking.ThreeOfAKind);
            }
            return(Next.Categorize(hand));
        }
Exemple #6
0
        public override HandRanking Categorize(Hand hand)
        {
            if (Next == null)
            {
                throw new InvalidOperationException();
            }

            if (hand.HasFlush() && hand.HasStrait() && hand.Has(Value.King) && hand.Has(Value.Ace))
            {
                return(HandRanking.RoyalStraitFlush);
            }
            return(Next.Categorize(hand));
        }
Exemple #7
0
        public override HandRanking Categorize(Hand hand)
        {
            if (Next == null)
            {
                throw new InvalidOperationException();
            }

            var p = hand.Cards.GroupBy(c => c.Value).Where(v => v.Count() == 2).Select(card => card);

            if (p.Count() == 2)
            {
                return(HandRanking.TwoPairs);
            }

            return(Next.Categorize(hand));
        }