Exemple #1
0
 public bool RunGame()
 {
     UI.DisplayTitleScreen();
     player       = new Human();
     inventories  = new List <Inventory>();
     numberOfDays = UI.SetGameLengthInDays();
     GenerateDaysAndWeathers();
     UI.DisplayCompleteWeatherForecast(weathers);
     for (byte i = 0; i < numberOfDays; i++)
     {
         inventories.Add(new Inventory(player.inventory));
         if (i + 1 < numberOfDays)
         {
             UI.DisplayWeatherForTomorrow(weathers[i + 1]);
         }
         days[i].RunDay(player, weathers[i]);
         UI.DisplayResults(inventories[i], player.inventory, InventoryDifference(inventories[i], player.inventory));
     }
     UI.DisplayResults(inventories[0], player.inventory, InventoryDifference(inventories[0], player.inventory));
     return(UI.DoesUserWantTo("keep playing"));
 }