Beispiel #1
0
        public void Result4()
        {
            string str  = "Вы проиграли";
            TEXT   text = new TEXT();

            Assert.AreEqual(text.Ishod(1, 3), str);
        }
Beispiel #2
0
        public void Result5()
        {
            string str  = "Вы выиграли";
            TEXT   text = new TEXT();

            Assert.AreEqual(text.Ishod(1, 2), str);
        }
Beispiel #3
0
        public void Result3()
        {
            string str  = "Ничья";
            TEXT   text = new TEXT();

            Assert.AreEqual(text.Ishod(3, 3), str);
        }
Beispiel #4
0
        public void Play()
        {
            TEXT text = new TEXT();
            BOT  bot  = new BOT();

            while (restart == "Д" || restart == "д")
            {
                numberyou = 0;
                while (numberyou < 1 || numberyou > 3)
                {
                    Console.Clear();
                    text.Hod();
                    numberyou = int.Parse(Console.ReadLine());
                }
                numberbot = bot.Random();
                str[0]    = text.ViborYou(numberyou);
                str[0]    = text.ViborBot(numberbot);
                Console.WriteLine(str[0]);
                Console.WriteLine(str[1]);
                Console.ReadKey();
                Console.WriteLine("Вы выбрали " + str[0]);
                Console.WriteLine("Бот выбрал " + str[1]);
                Console.WriteLine(text.Ishod(numberyou, numberbot));
                restart = text.Restart();
            }
        }
Beispiel #5
0
        public void Input1()
        {
            string[] str = new string[2];
            str[0] = "Камень";
            str[1] = "Бумага";
            TEXT text = new TEXT();

            Assert.AreEqual(text.Vibor(1, 3), str);
        }
Beispiel #6
0
        public void Input3()
        {
            string[] str = new string[2];
            str[0] = "Ножницы";
            str[1] = "Бумага";
            TEXT text = new TEXT();

            Assert.AreEqual(text.Vibor(2, 3), str);
        }
Beispiel #7
0
        public void Input2()
        {
            string[] str = new string[2];
            str[0] = "Камень";
            str[1] = "Ножницы";
            TEXT text = new TEXT();

            Assert.AreEqual(text.Vibor(1, 2), str);
        }