Пример #1
0
 public void SimulateDayOfGame(Player player, Stand stand, Inventory inventory, Day day, Customer customer, Weather weather)
 {
     for (int i = 0; i < 30; i++)
     {
         if (stand.cupsOfLemonadeLeftInPitcher <= 0)
         {
             UserInterface.NotEnoughSuppliesPrompt(player);
             i = 30;
             break;
         }
         else if (inventory.IceCount >= 0 && inventory.SugarCount >= 0 && inventory.LemonCount >= 0 && inventory.CupCount >= 0)
         {
             customer = new Customer();
             stand.DetermineIfCustomerBuys(customer, weather, player, inventory, day);
             if (stand.cupsOfLemonadeLeftInPitcher <= 0)
             {
                 stand.PourLemonadePitcher(inventory);
             }
         }
         else
         {
             UserInterface.NotEnoughSuppliesPrompt(player);
             break;
         }
     }
 }
Пример #2
0
 public void OnePlayerGameSetup()
 {
     player1 = new Player();
     UserInterface.DisplayOnePlayerNameChoice(player1);
     store            = new Store();
     player1Inventory = new Inventory();
     player1Day       = new Day();
     player1Stand     = new Stand();
     player1Customers = new Customer();
     player1Weather   = new Weather();
 }
Пример #3
0
 public void TwoPlayerGameSetup()
 {
     player1 = new Player();
     player2 = new Player();
     UserInterface.DisplayFirstPlayerNameChoice(player1);
     UserInterface.DisplaySecondPlayerNameChoice(player2);
     store            = new Store();
     player1Inventory = new Inventory();
     player2Inventory = new Inventory();
     player1Day       = new Day();
     player2Day       = new Day();
     player1Stand     = new Stand();
     player2Stand     = new Stand();
     player1Customers = new Customer();
     player2Customers = new Customer();
     player1Weather   = new Weather();
     player2Weather   = new Weather();
 }