예제 #1
0
        protected override async Task <bool> ApplyOption2(IGameState gameState)
        {
            var success = await MakeWine.MakeWine();

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

            if (!MakeWine.CanExecuteSpecial)
            {
                return(true);
            }
            success = await MakeWine.MakeWine();

            if (!success)
            {
                return(await MetroDialog.DoneOrCancelVisitor("making wine"));
            }

            if (!MakeWine.CanExecuteSpecial)
            {
                return(true);
            }
            success = await MakeWine.MakeWine();

            if (!success)
            {
                return(await MetroDialog.DoneOrCancelVisitor("making wine"));
            }

            return(true);
        }
예제 #2
0
        protected override async Task <bool> OnApply(IGameState gameState)
        {
            var success = await HarvestField.OnExecute();

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

            if (!HarvestField.CanExecuteSpecial)
            {
                return(true);
            }
            success = await HarvestField.OnExecute();

            if (!success)
            {
                return(await MetroDialog.DoneOrCancelVisitor("harvesting"));
            }

            if (!HarvestField.CanExecuteSpecial)
            {
                return(true);
            }
            success = await HarvestField.OnExecute();

            if (!success)
            {
                return(await MetroDialog.DoneOrCancelVisitor("harvesting"));
            }

            gameState.VictoryPoints += 2;

            return(true);
        }
예제 #3
0
        protected override async Task <bool> OnApply(IGameState gameState)
        {
            var redWinesBefore       = gameState.RedWines.Count(p => p.IsBought);
            var whiteWinesBefore     = gameState.WhiteWines.Count(p => p.IsBought);
            var blushWinesBefore     = gameState.BlushWines.Count(p => p.IsBought);
            var sparklingWinesBefore = gameState.SparklingWines.Count(p => p.IsBought);

            var success = await MakeWine.MakeWine();

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

            if (!MakeWine.CanExecuteSpecial)
            {
                return(true);
            }
            success = await MakeWine.MakeWine();

            if (!success)
            {
                AddVictoryPoints(gameState, redWinesBefore, whiteWinesBefore, blushWinesBefore, sparklingWinesBefore);
                return(await MetroDialog.DoneOrCancelVisitor("harvesting"));
            }

            if (!MakeWine.CanExecuteSpecial)
            {
                return(true);
            }
            success = await MakeWine.MakeWine();

            if (!success)
            {
                AddVictoryPoints(gameState, redWinesBefore, whiteWinesBefore, blushWinesBefore, sparklingWinesBefore);
                return(await MetroDialog.DoneOrCancelVisitor("harvesting"));
            }

            AddVictoryPoints(gameState, redWinesBefore, whiteWinesBefore, blushWinesBefore, sparklingWinesBefore);

            return(true);
        }