public static void HotCold()
        {
            double distance = Math.Floor(Math.Sqrt(Math.Pow(RandomNumAndCursorTracking.userX - RandomNumAndCursorTracking.randomX, 2) + Math.Pow(RandomNumAndCursorTracking.userY - RandomNumAndCursorTracking.randomY, 2)));

            if (distance > 400)
            {
                Console.WriteLine("Frozen");
                TimerAndDifficulty.timer();
            }
            else if (distance >= 200)
            {
                Console.WriteLine("Ice Cold");
                TimerAndDifficulty.timer();
            }
            else if (distance >= 100)
            {
                Console.WriteLine("Cold");
                TimerAndDifficulty.timer();
            }
            else if (distance >= 50)
            {
                Console.WriteLine("Warm");
                TimerAndDifficulty.timer();
            }
            else if (distance >= 30)
            {
                Console.WriteLine("On Fire");
                TimerAndDifficulty.timer();
            }
            else if (distance > difficulty)
            {
                targetHit.HitWin();
                Console.WriteLine("Hit");
            }
        }
Beispiel #2
0
        public static void start()
        {
            DataCreateCheck.DataCheck();     //makes sure data.txt is there
            ScorePrint.lastScore();
            PlayerName.playerName();         //Gets and prints player name
            TimerAndDifficulty.Difficulty(); //decide how much time you get
            HotColdDificulty.Difficulty();   //decide how close you have to be
            Console.WriteLine("Hit enter when you are ready to start.");
            Console.ReadLine();
            RandomNumAndCursorTracking.randomNum(); //gets random number
            TimerAndDifficulty.timer();             //starts main part of game

            PrintScorePlayAgain.OutputScore();      //sends score to data.txt
            PrintScorePlayAgain.PlayAgain();        //asks player to play again
        }