コード例 #1
0
ファイル: Day.cs プロジェクト: kyleeq/Lemonade-Stand-2
        //member methods
        public void DayKickOff(Player player)
        {
            double initialBank = player.bank;

            if (UserInterface.RecipeStatement() == true)
            {
                player.recipe.SetRecipe();
            }
            UserInterface.ForecastedWeatherStatement(weather);
            if (UserInterface.StoreStatement() == true)
            {
                store.GoToStore(player);
            }
            UserInterface.CurrentWeatherStatement(weather);
            foreach (Customer customer in customers)
            {
                if (customer.PricePointDeterminant(player.recipe.lemonadePrice, weather.CurrentTemp) == true)
                {
                    player.sellCup++;
                }
            }
            Console.WriteLine($"You sold {player.sellCup} cups. You made {player.bank - initialBank} dollars.");
            UserInterface.DisplayInventory(player.inventory);
        }