/// <summary>
        /// Update move state with visited rival cities
        /// </summary>
        /// <param name="input">The code for the rival cities visited specified by the user</param>
        public override void UpdateMoveStateForStep(string input, BotMoveState moveState)
        {
            // TODO: what if the bot visited more than 1?

            var movingCaravan = moveState.TradeCaravansAvailable[moveState.CurrentCaravanIdToMove - 1];

            switch (Convert.ToInt32(input))
            {
            case 1:
                movingCaravan.CaravanRivalCityColorDestination = "Red";
                break;

            case 2:
                movingCaravan.CaravanRivalCityColorDestination = "Green";
                break;

            case 3:
                movingCaravan.CaravanRivalCityColorDestination = "Blue";
                break;

            default:
                movingCaravan.CaravanRivalCityColorDestination = "White";
                break;
            }

            var smallestpile = _smallestTradeTokenPileResolver.ResolveSmallestTokenPile(moveState.ActiveFocusBarForMove, moveState.TradeTokensAvailable);

            moveState.SmallestTradeTokenPileType          = smallestpile;
            movingCaravan.SmallestTradeTokenPileType      = smallestpile;
            moveState.TradeTokensAvailable[smallestpile] += BaseTradeTokensForRivalCityVisit;
        }
        public override void UpdateMoveStateForStep(string input, BotMoveState moveState)
        {
            var attckMove    = moveState.AttacksAvailable[moveState.CurrentAttackMoveId - 1];
            var smallestpile = _smallestTradeTokenPileResolver.ResolveSmallestTokenPile(moveState.ActiveFocusBarForMove, moveState.TradeTokensAvailable);

            moveState.SmallestTradeTokenPileType = smallestpile;
            moveState.TradeTokensAvailable[moveState.SmallestTradeTokenPileType] += 1;
            moveState.TradeTokensAvailable[FocusType.Military] -= attckMove.BotSpentMilitaryTradeTokensThisTurn;
        }
Ejemplo n.º 3
0
 public override void PrimeMoveState(BotGameState botGameStateService)
 {
     _moveState = _scienceResolverUtility.CreateBasicScienceMoveState(botGameStateService, BaseTechIncreasePoints);
     _moveState.SmallestTradeTokenPileType = _smallestTradeTokenPileResolver.ResolveSmallestTokenPile(botGameStateService.ActiveFocusBar, botGameStateService.TradeTokens);
 }