Exemple #1
0
        public void RunGame()
        {
            UserInterface.DisplayGameInstructions();
            Console.ReadLine();
            Console.Clear();

            string playerName = GetPlayerName();

            player = new Player(playerName);

            GetWeatherForecast();

            double runningTotalProfit      = 0;
            int    overallNumberOfCupsSold = 0;

            foreach (Day day in days)
            {
                Console.WriteLine($"Today is {day.Name}.");
                day.DisplayWeather();
                player.Recipe.DecideRecipe();
                player.Inventory.DisplayInventory();
                player.DecideIfBuyingItems();

                RunDay(day);

                runningTotalProfit      += day.Profit;
                overallNumberOfCupsSold += day.NumberOfCupsSold;

                UserInterface.DisplayDailyProfit(day.Profit, day.NumberOfCupsSold);
            }

            UserInterface.DisplayTotalProfit(runningTotalProfit, overallNumberOfCupsSold);
            Console.ReadLine();
        }