Exemplo n.º 1
0
        private static void ParseFile(string inFile, string outFile)
        {
            var data = new DronesData();
            data.Load(inFile);

            Console.WriteLine($"Planing {inFile}...");

            var commander = new Commander(data);
            commander.PlanWork();

            SaveWork(commander.drones, outFile);
        }
Exemplo n.º 2
0
        public Commander(DronesData data)
        {
            this.data = data;
            this.drones = new List<Drone>(data.NumberOfDrones);

            for (int i = 0; i < data.NumberOfDrones; i++)
            {
                drones.Add( new Drone
                {
                    Index = i,
                    FreeLocation = data.Warehouses[0].Location,
                    WillBeFreeAtStep = 0
                });
            }
        }