Beispiel #1
0
        public void GetCustomers(Player player)
        {
            for (int i = 0; i < customerAmount; i++)
            {
                //if(game.listOfCustomers.disposition == true)
                {
                    Customer customer = new Customer();
                    customer.GetAccessibility(weatherConditions);
                    customer.GetDisposition(player);
                    if (customer.disposition == true)
                    {
                        customer.Buy();
                        listOfCustomers.Add(customer);
                        if (listOfCustomers.Count == player.inventory.pitcher) //cup
                        {
                            for (int index = 0; index < listOfCustomers.Count; index++)
                            {
                                lemonadeSales = player.inventory.pitcher -= listOfCustomers[index].purchase;
                            }
                            break;
                        }
                        if (listOfCustomers.Count < player.inventory.pitcher) //cup
                        {
                            lemonadeSales             = listOfCustomers.Count;
                            player.inventory.pitcher -= listOfCustomers.Count;
                        }
                        else
                        {
                        }
                    }
                }
            }
            Console.WriteLine($"You sold {lemonadeSales} cups of lemonade for the day.");
            player.wallet.money += (lemonadeSales * player.cupPrice);

            DisplayAllOfTodaysCustomers();
            System.Threading.Thread.Sleep(2000);
        }