예제 #1
0
 public void AddPromoteByReplacementRule(PieceType promotingType, OptionalPromotionLocationDelegate conditionDelegate)
 {
     if (PromotingType == null)
     {
         PromotingType = promotingType;
     }
     AddRule(new PromoteByReplacementRule(promotingType, conditionDelegate));
 }
예제 #2
0
        public void AddPromotionCapability
            (PieceType promotingType,
            List <PieceType> promotionTypes,
            List <PieceType> replacementPromotionTypes,
            OptionalPromotionLocationDelegate conditionDeletage)
        {
            PromotionCapability newCapability = new PromotionCapability();

            newCapability.PromotingType              = promotingType;
            newCapability.PromotionTypes             = promotionTypes;
            newCapability.ReplacementPromotionTypes  = replacementPromotionTypes;
            newCapability.ConditionDelegate          = conditionDeletage;
            newCapability.FromAndToConditionDelegate = null;
            promotionCapabilities.Add(newCapability);
        }
예제 #3
0
 public GrossChessPromotionRule(PieceType promotingType, OptionalPromotionLocationDelegate conditionDelegate) :
     base(promotingType, conditionDelegate)
 {
 }
예제 #4
0
 public PromoteByReplacementRule(PieceType promotingType, OptionalPromotionLocationDelegate conditionDelegate)
 {
     this.promotingType = promotingType; condition = conditionDelegate;
 }