Ejemplo n.º 1
0
        public IActionResult createDrone()
        {
            string _model = Request.Form["model"];

            Drone.Create(new Drone(_model, DroneState.Off, 100));
            return(openDroneListView());
        }
Ejemplo n.º 2
0
        public IEnumerable <string> DeliverOrders(uint id, IEnumerable <string> routes)
        {
            var drone = Drone.Create(id);

            var routePlan = routes.Select(r => Route.FromString(r)).Take(_deliverySettings.MaxOrdersByDrone);

            return(routePlan.Select(r => drone = DeliverOrder(_deliverySettings, drone, r))
                   .Select(d => d.Position.ToString()).Prepend(OUTFILE_HEADER));
        }