Esempio n. 1
0
        static void Main(string[] args)
        {
            List <ASpaceship> ships   = new List <ASpaceship>();
            List <Planet>     planets = new List <Planet>();

            //create list of ships and planets
            FillingLists(planets, ships);
            int amountShips = ships.Count;
            int cargoNeed   = planets.Sum(obj => obj.Need);

            SpacePort.consoleOutputPlanetName = InformationViewAboutPlanet;
            SpacePort.consoleOutputShipInfo   = InformationViewAboutShips;
            SpacePort.ToRegisterFlight(planets, ships);
            Console.WriteLine("--------------------------------------------------------------------------------------");
            Console.WriteLine();
            Console.WriteLine(" Total spaceShips = " + amountShips + "\t\t" + "Total planets = " + planets.Count + "\t\t" + "All delivered cargo = " + cargoNeed);
            Console.ReadKey();
        }