public override void DoMove()
        {
            int counterPositionOnScreen = 0;

            while (true)
            {
                RandomCheaterPlayerHandler.WaitOne();

                int Rand = RandomNumber.Next(MinValue, MaxValue);

                while (TestEnterdNumberInArray(Rand))
                {
                    Rand = RandomNumber.Next(MinValue, MaxValue);
                }

                AddEnterdNumberInArray(Rand);

                if (Rand == RezultValue)
                {
                    Win     = true;
                    EndGame = true;
                }

                Console.SetCursorPosition(55, 9 + counterPositionOnScreen);
                Console.Write("{0,4} {1}", Rand, Thread.CurrentThread.Name);
                counterPositionOnScreen++;

                HardWorkingCheaterPlayerHandler.Set();
            }
        }
Exemple #2
0
        public override void DoMove()
        {
            int counterPositionOnScreen = 0;

            while (true)
            {
                RandomCleverPlayerHandler.WaitOne();

                int Rand = RandomNumber.Next(MinValue, MaxValue);

                for (var i = 0; i < EnteredNumberLocal.Length; i++)
                {
                    if (Rand == EnteredNumberLocal[i])
                    {
                        Rand = RandomNumber.Next(MinValue, MaxValue);
                        i    = -1;
                    }
                }

                AddEnterdNumberInLocalArray(Rand);
                AddEnterdNumberInArray(Rand);

                if (Rand == RezultValue)
                {
                    Win     = true;
                    EndGame = true;
                }

                Console.SetCursorPosition(35, 9 + counterPositionOnScreen);
                Console.Write("{0,4} {1}", Rand, Thread.CurrentThread.Name);
                counterPositionOnScreen++;

                RandomCheaterPlayerHandler.Set();
            }
        }