예제 #1
0
        public override void Update(GameStateDelta game)
        {
            var r = PopResults();

            Building[] bases = game.Objects.Where((_) => _.OwnerPlayer.Id == playerId && _ is Building && (_ as Building).Type == BuildingType.Base).Cast <Building>().ToArray();
            if (!wasA)
            {
                PushAction(new PlayerActionOperation(PlayerActionType.StartResearch, 1, bases[0].Id, (int)LocalResearch.TestResearch));
                wasA = true;
            }

            tick++;
        }
예제 #2
0
 /// <summary>
 /// Called each game tick. Controller must process game state and determine what to do (push it with <see cref="PlayerController.PushAction(PlayerAction)"/>)
 /// </summary>
 /// <param name="game">Game state, that is available to this player</param>
 public abstract void Update(GameStateDelta game);
예제 #3
0
 public override void Update(GameStateDelta game)
 {
     PopResults();
     PushAction(new PlayerAction(PlayerActionType.Idle, ++actionId));
 }