예제 #1
0
        public static void PrintSlotInfo()
        {
            Harbour dailyHarbour = new Harbour();

            dailyHarbour.ShowNumberOfAvailableSlots();
            Harbour.PrintRejectedBoats();
        }
예제 #2
0
        static void Main(string[] args)
        {
            GameGreeting();
            DayIterations = 1;
            Harbour h = new Harbour();

            while (DayIterations < 20)
            {
                h.RemoveLeavingBoatsFromHarbour();
                var harbourQueue = h.CreateRandomBoatQueueObjects();
                foreach (var boat in harbourQueue)
                {
                    h.AddBoatsToSlot(boat);
                }
                h.DisplayHarbourCapacity();
                h.DisplayBoatsRejected();
                harbourQueue.Clear();
                DayIterations++;
                h.DecrementDaysToStayFromBoatsAtEndOfDay();
                Console.WriteLine("Press any key to Continue to the next day..");
                Console.ReadKey();
                Console.Clear();
            }
            Console.WriteLine("The harbour sim is now complete..");
        }
예제 #3
0
        public static void PrintUI()
        {
            int     numberOfDaysToShow = 30;
            Harbour dailyHarbour       = new Harbour();

            for (int i = 0; i < numberOfDaysToShow; i++)
            {
                dailyHarbour.DeleteDepartingBoats();
                dailyHarbour.DailyBoatArrival();
                PrintTable();
                Console.ReadLine();
                dailyHarbour.CountDownDaysInHarbour();
                Console.Clear();
            }
        }
예제 #4
0
        static void Main(string[] args)
        {
            Harbour harbour = new Harbour();

            harbour.ShowHarbour();
        }