/// <summary> /// Gets called every game tick. Returns a controller state /// </summary> /// <param name="gameTickPacket"></param> /// <returns>The desired controller inputs to be pressed</returns> public override Controller GetOutput(GameTickPacket gameTickPacket) { try { GameState gameState = GameState.ParseFromPacket(gameTickPacket); Ball ball = Ball.ParseFromGamePacket(gameTickPacket); BotState botState = BotState.ParseFromGameState(gameState, index); Destination destination = Destination.DecideDestination(map, gameState, botState, allyTeam, enemyTeam); controller = CarControl.GetControllerForDestination(controller, destination, botState); controller.Throttle = 1f; Debug.DrawAll(Renderer, botState, car, ball, map, allyTeam, enemyTeam); } catch (Exception ex) { Console.WriteLine(ex); } return(controller); }