示例#1
0
        private void SetBounds()
        {
            Console.Clear();
            Console.WriteLine("Specify yout bounds of play:");
            Console.Write("Lower Limit: ");
            lowerBound = int.Parse(Console.ReadLine());
            Console.WriteLine();

            Console.Write("Upper Limit: ");
            upperBound = int.Parse(Console.ReadLine());

            generatedNumber = PickNumber.SpecifiedInt();

            Console.WriteLine();
        }
示例#2
0
        public void PlayBounds()
        {
            Console.WriteLine("Press F1 to play between 0-100 || Press F2 to set your own bounds to play in.");

            var input = Console.ReadKey();

            switch (input.Key)
            {
            case ConsoleKey.F1:

                generatedNumber = PickNumber.RandomInt();
                Play();
                break;

            case ConsoleKey.F2:
                SetBounds();
                Play();
                break;

            default:
                break;
            }
        }