Пример #1
0
        protected override async Task <bool> OnApply(IGameState gameState)
        {
            var success = await BuildStructure.OnExecute();

            if (!success)
            {
                return(false);
            }

            var allVinesBeforePlanting = gameState.Hand.Vines.ToList();

            success = await PlantVine.OnExecute();

            if (!success)
            {
                return(false);
            }

            var allVinesAfterPlanting = gameState.Hand.Vines.ToList();
            var plantedVine           = allVinesBeforePlanting.Except(allVinesAfterPlanting).Single();

            if (plantedVine.WhiteValue + plantedVine.RedValue == 4)
            {
                gameState.VictoryPoints++;
            }

            return(true);
        }
Пример #2
0
 protected override Task <bool> ApplyOption2(IGameState gameState)
 {
     BuildStructure.BuildingBonus = 1;
     return(BuildStructure.OnExecute());
 }