public void SendARequestToControlCenterForPackageDelivery()
        {
            WarehouseRequest wr = new WarehouseRequest();

            wr.CreateARequestForPackageDelivery(this, packageList[0]);
            Controlcenter.AddAWarehouseRequestToTheList(wr);
            PackagesAwaitingForDronePickup.Add(packageList[0]);
            PackageList.Remove(packageList[0]);
        }
        public void ExecuteAWarehouseRequest(WarehouseRequest warehouseRequest)
        {
            WarehouseRequest currentWarehouseRequest    = warehouseRequest;
            List <Drone>     dronesWithEnoughCarrySpace = DroneList.FindAll(c => c.CurrentCarryWeight > currentWarehouseRequest.Package.Weight);

            if (dronesWithEnoughCarrySpace.Count <= 0)
            {
                WarehouseRequests.Enqueue(WarehouseRequests.Dequeue());
            }
            else
            {
                Drone drone = FindTheNearestDroneToTheWarehouseFromADroneList(warehouseRequest.Warehouse, dronesWithEnoughCarrySpace);
                drone.AddAnOrderToTheQueue(new Order());
            }
        }
 public bool AddAWarehouseRequestToTheList(WarehouseRequest warehouseRequest)
 {
     WarehouseRequests.Enqueue(warehouseRequest);
     return(true);
 }