Exemple #1
0
        public IActionResult createDrone()
        {
            string _model = Request.Form["model"];

            Drone.Create(new Drone(_model, DroneState.Off, 100));
            return(openDroneListView());
        }
        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));
        }