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); }
protected override Task <bool> ApplyOption2(IGameState gameState) { BuildStructure.BuildingBonus = 1; return(BuildStructure.OnExecute()); }