コード例 #1
0
        public List<Command> GetCommands(BoardStatus status)
        {
            _status = status;
            _commands = new List<Command>
                {
                    //if its the first round build a miner otherwise try to build an attacker
                    status.Round == 1
                        ? new BuildLesserMinionCommand(1, 1, 1, 4, 2, 1, status.YourBase.X + 1, status.YourBase.Y - 1)
                        : new BuildLesserMinionCommand(3, 2, 1, 1, 2, 1, status.YourBase.X + 1, status.YourBase.Y - 1)
                };

            AssignMinionRoles(status);

            GoMining(_miners);

            if (status.Vision.EnemyBases.Any())
            {
                MoveAndDestroy();
            }
            else
            {
                MoveAround(_attackers);
            }

            return _commands;
        }
コード例 #2
0
 // This method runs at the start of every match on turn 1
 public void Initialize(BoardStatus boardStatus)
 {
     // Set up any data structures here
 }
コード例 #3
0
 private void AssignMinionRoles(BoardStatus status)
 {
     _miners = new List<Minion>();
     _attackers = new List<Minion>();
     foreach (var minion in status.YourMinions)
     {
         if (minion.Mining > 30)
         {
             _miners.Add(minion);
         }
         else
         {
             _attackers.Add(minion);
         }
     }
 }