Example #1
0
        public DefaultPlayerAction(
            string name,
            ICardPicker purchaseOrder,
            ICardPicker actionOrder,
            bool chooseDefaultActionOnNone,
            bool enablePenultimateProvinceRule,
            ICardPicker treasurePlayOrder,
            ICardPicker discardOrder,
            ICardPicker trashOrder,
            ICardPicker gainOrder)
        {
            this.purchaseOrder = purchaseOrder;
            this.actionOrder   = actionOrder == null?DefaultStrategies.DefaultActionPlayOrder(purchaseOrder) : actionOrder;

            this.discardOrder = discardOrder == null?DefaultStrategies.DefaultDiscardOrder() : discardOrder;

            this.trashOrder = trashOrder == null?DefaultStrategies.DefaultTrashOrder(purchaseOrder) : trashOrder;

            this.treasurePlayOrder = treasurePlayOrder == null?DefaultStrategies.DefaultTreasurePlayOrder() : treasurePlayOrder;

            this.gainOrder = gainOrder != null ? gainOrder : purchaseOrder;
            this.chooseDefaultActionOnNone     = chooseDefaultActionOnNone;
            this.enablePenultimateProvinceRule = enablePenultimateProvinceRule;
            this.name = name;
            this.defaultActionOrder = DefaultStrategies.DefaultActionPlayOrder(purchaseOrder);
            this.defaultShouldPlay  = DefaultPlayRules.DefaultResponses.GetCardShouldPlayDefaults(this);
        }
Example #2
0
        public PlayerAction(
            string name,
            ICardPicker purchaseOrder,
            ICardPicker actionOrder        = null,
            bool chooseDefaultActionOnNone = true,
            ICardPicker treasurePlayOrder  = null,
            ICardPicker discardOrder       = null,
            ICardPicker trashOrder         = null,
            ICardPicker gainOrder          = null)
        {
            this.purchaseOrder = purchaseOrder;
            this.actionOrder   = actionOrder == null?DefaultStrategies.DefaultActionPlayOrder(purchaseOrder) : actionOrder;

            this.discardOrder = discardOrder == null?DefaultStrategies.DefaultDiscardOrder() : discardOrder;

            this.trashOrder = trashOrder == null?DefaultStrategies.DefaultTrashOrder(purchaseOrder) : trashOrder;

            this.treasurePlayOrder = treasurePlayOrder == null?DefaultStrategies.DefaultTreasurePlayOrder() : treasurePlayOrder;

            this.gainOrder = gainOrder != null ? gainOrder : purchaseOrder;
            this.chooseDefaultActionOnNone = chooseDefaultActionOnNone;
            this.name = name;
            this.defaultActionOrder = DefaultStrategies.DefaultActionPlayOrder(purchaseOrder);

            this.defaultCardResponses = new PlayerActionFromCardResponses(DefaultPlayRules.DefaultResponses.GetCardResponses(this));
            this.defaultShouldPlay    = DefaultPlayRules.DefaultResponses.GetCardShouldPlayDefaults(this);
        }