예제 #1
0
 public void DayLoop()
 {
     for (currentDay = 1; currentDay <= days.Count; currentDay++)
     {
         day.CreateDay();
         Console.WriteLine($"Day {currentDay}\n");
         days[currentDay].Forecast();
         store.GoToStore(playerOne);
         playerOne.recipe.SetRecipe();
         day.BeginDay(playerOne);
     }
 }
예제 #2
0
        public void RunGame(Player player, Inventory inventory, Recipe recipe, Day newDay, Store newStore)
        {
            //List<Day> RunDays = new List<Day>(); //*KEEP FOR MY OWN RECORDS* Possibly a different approach of creating separate objects for days.

            //for (int i = 0; i < gameLength; i++)
            //{
            //    Day day = new Day(rng);
            //    RunDays.Add(day);
            //}


            ///////////

            //for (int i = 0; i < 7; i++)
            //{
            //    RunDays[i].BeginDay();
            //}
            //RunDays[5]

            currentDay = 1;
            while (currentDay <= gameLength)
            {
                newDay.BeginDay();
                MainMenu(player, newDay, newStore);
                newDay.SellLemonade(player, newDay, newStore);
                newDay.DisplayEarnings(player);
                DisplayProfits(player);
                recipe.pitcher     = 0;
                player.profits     = 0;
                player.expenses    = 0;
                inventory.iceCubes = 0;
                Console.Clear();
                currentDay++;
            }
            EndGame(player);
        }