Esempio n. 1
0
 public SuitTieredGridStatus(GridCategoryEnum category)
 {
     Category      = category;
     SuitedStatus  = new SuitedStatus <T>();
     PairedStatus  = new PairedStatus <T>();
     OffsuitStatus = new OffsuitStatus <T>();
 }
Esempio n. 2
0
        public void SetFirstSuitUnlessForOffsuitGrid(SuitEnum suit, T set, Func <T, bool> unless)
        {
            if (Category != GridCategoryEnum.Offsuit)
            {
                throw new InvalidOperationException();
            }

            OffsuitStatus.SetAllUnless(set, unless);
        }
Esempio n. 3
0
        public int GetCount(Func <T, bool> func)
        {
            switch (Category)
            {
            case GridCategoryEnum.Suited:
                return(SuitedStatus.Count(func));

            case GridCategoryEnum.Paired:
                return(PairedStatus.Count(func));

            case GridCategoryEnum.Offsuit:
                return(OffsuitStatus.Count(func));

            default:
                throw new InvalidOperationException();
            }
        }
Esempio n. 4
0
        public void SetAllUnless(T set, Func <T, bool> unless)
        {
            switch (Category)
            {
            case GridCategoryEnum.Suited:
                SuitedStatus.SetAllUnless(set, unless);
                break;

            case GridCategoryEnum.Offsuit:
                OffsuitStatus.SetAllUnless(set, unless);
                break;

            case GridCategoryEnum.Paired:
                PairedStatus.SetAllUnless(set, unless);
                break;
            }
        }
Esempio n. 5
0
        public OffsuitStatus <T> Clone()
        {
            var cloned = new OffsuitStatus <T>();

            cloned.HeartSpadeStatus   = HeartSpadeStatus;
            cloned.HeartDiamondStatus = HeartDiamondStatus;
            cloned.HeartClubStatus    = HeartClubStatus;
            cloned.SpadeDiamondStatus = SpadeDiamondStatus;
            cloned.SpadeClubStatus    = SpadeClubStatus;
            cloned.DiamondClubStatus  = DiamondClubStatus;
            cloned.SpadeHeartStatus   = SpadeHeartStatus;
            cloned.DiamondHeartStatus = DiamondHeartStatus;
            cloned.ClubHeartStatus    = ClubHeartStatus;
            cloned.DiamondSpadeStatus = DiamondSpadeStatus;
            cloned.ClubSpadeStatus    = ClubSpadeStatus;
            cloned.ClubDiamondStatus  = ClubDiamondStatus;

            return(cloned);
        }
        public GridStatusInPlayerRange Clone()
        {
            var cloned = new GridStatusInPlayerRange(Category);

            cloned.RankWiseStatus = this.RankWiseStatus;
            switch (Category)
            {
            case GridCategoryEnum.Suited:
                cloned.SuitedStatus = SuitedStatus.Clone();
                break;

            case GridCategoryEnum.Paired:
                cloned.PairedStatus = PairedStatus.Clone();
                break;

            case GridCategoryEnum.Offsuit:
                cloned.OffsuitStatus = OffsuitStatus.Clone();
                break;
            }

            return(cloned);
        }