示例#1
0
        public void RunWeek()
        {
            for (int i = 0; i < gameLength; i++)
            {
                UserInterface.DisplayWeekCounter(i + 1);

                GenerateWeeklyForecast(random);

                UserInterface.DisplayForecast(weeklyForecast);
                UserInterface.ClearDisplay();

                for (int j = 0; j < 7; j++)
                {
                    // Display User Inventory
                    UserInterface.DisplayInventory(player.inventory.lemons.Count(), player.inventory.sugarCubes.Count(), player.inventory.iceCubes.Count(), player.inventory.cups.Count());
                    UserInterface.ClearDisplay();

                    // Go to store for the day
                    RunStorePhase();
                    UserInterface.ClearDisplay();

                    // Run the stand for one day
                    days.Add(new Day(player, random, weeklyForecast[j]));

                    // Check if player is broke, end game if so
                    if (IsWalletEmpty() == true)
                    {
                        UserInterface.AllOutOfMoney(player.name);
                        return;
                    }
                }

                ClearForecast();
            }

            UserInterface.DisplayGameFinish(player.name, player.wallet.Money);
        }