Example #1
0
 public IEnumerable <IMicroAction> GetMicroActions(WorldState worldState, int playerIndex)
 {
     return(GoToTarget.GetMicroActions((currentWorldState, currentPlayerIndex) =>
     {
         var data = GetData(currentWorldState, currentPlayerIndex);
         return new GoToTargetOptions
         {
             PlayerPhysics = data.Physics,
             Target = data.BallLocation,
             UseBoost = true
         };
     }, new TimeSpan(0, 0, 5)));
 }
Example #2
0
        public IEnumerable <IMicroAction> GetMicroActions(WorldState worldState, int playerIndex)
        {
            return(GoToTarget.GetMicroActions((currentWorldState, currentPlayerIndex) =>
            {
                var data = GetData(worldState, playerIndex);
                var targetBoostPad = data.NormalBoostPriority > data.FullBoostPriority ? data.NearestNormal : data.NearestFull;

                return new GoToTargetOptions
                {
                    PlayerPhysics = data.PlayerPhysics,
                    Target = targetBoostPad.Location,
                    UseBoost = false
                };
            }, new TimeSpan(0, 0, 2)));
        }