Пример #1
0
        //member methods

        public void RunGameCycle()
        {
            UserInterface.DisplayInstructions();


            for (int i = 0; i <= 6; i++)
            {
                //get daily forcast
                //get daily weather
                day = new Day(random);
                Console.WriteLine(" ");
                Console.WriteLine("^^^^^^^Weather Forecast^^^^^^^^^");
                Console.WriteLine(" ");
                Console.WriteLine(" Today's forecast: " + day.GenerateForecastedTemperature(random) + " and " + day.GenerateForecast(random));
                Console.WriteLine(" ");
                Console.WriteLine(" Day: " + (i + 1));
                Console.WriteLine("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
                CommandCenter(user, store, day, weather);
                Console.WriteLine(" Day change");
            }


            user.ConvertDoubleToDecimal();

            using (var db = new LemondeStand.DataModel())
            {
                db.HighScores.Add(new LemondeStand.HighScore()
                {
                    High_Scores = user.HighScoreMoney
                });
                db.SaveChanges();
            }

            Console.WriteLine(" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
            Console.WriteLine(" ");
            Console.WriteLine(" Congratulations! You made it through the week.");
            Console.WriteLine(" " + user.HighScoreMoney + " was added to high scores table");
            Console.WriteLine(" ");
            Console.WriteLine(" Press Enter to exist");
            Console.WriteLine(" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
            Console.ReadKey();
        }