Ejemplo n.º 1
0
 public Game()
 {
     random    = new Random();
     player    = new Player();
     day       = new Day(random);
     pos       = new PointOfSale();
     store     = new Store();
     customers = new List <Customer>();
     ui        = new UI();
 }
Ejemplo n.º 2
0
 internal void DisplayResultsOfTheDay(Player player, PointOfSale pos, Game game)
 {
     Console.WriteLine("TODAY'S RESULTS");
     Console.WriteLine(Environment.NewLine);
     Console.WriteLine("You sold lemonade to " + pos.SuccessfulSales + " out of " + game.customers.Count + " potential customers.");
     Console.WriteLine(Environment.NewLine);
     Console.WriteLine("You spent a total of $" + player.MoneySpentToday + " today.");
     Console.WriteLine("You earned a total of $" + pos.AmountMadeInSalesToday + " today");
     if (player.TotalMoneyEarned > player.TotalMoneySpent)
     {
         Console.WriteLine("Your lemonade stand has ultimately experienced a profit of $" + (player.TotalMoneyEarned - player.TotalMoneySpent) + " since the start of your business");
     }
     else if (player.TotalMoneyEarned < player.TotalMoneySpent)
     {
         Console.WriteLine("Your lemonade stand has ultimately experienced a loss of $" + (player.TotalMoneySpent - player.TotalMoneyEarned) + " since the start of your business");
     }
 }