public override void DoMove() { int counterPositionOnScreen = 0; while (true) { HardPlayerHandler.WaitOne(); if (LastMove == 0) { LastMove = MinValue; AddEnterdNumberInArray(LastMove); } else { LastMove++; AddEnterdNumberInArray(LastMove); } if (LastMove == RezultValue) { Win = true; EndGame = true; } Console.SetCursorPosition(0, 9 + counterPositionOnScreen); Console.Write("{0,4} {1}", LastMove, Thread.CurrentThread.Name); counterPositionOnScreen++; RandomPlayerHandler.Set(); } }
public override void DoMove() { int counterPositionOnScreen = 0; while (true) { RandomPlayerHandler.WaitOne(); int Rand = RandomNumber.Next(MinValue, MaxValue); AddEnterdNumberInArray(Rand); if (Rand == RezultValue) { Win = true; EndGame = true; } Console.SetCursorPosition(20, 9 + counterPositionOnScreen); Console.Write("{0,4} {1}", Rand, Thread.CurrentThread.Name); counterPositionOnScreen++; RandomCleverPlayerHandler.Set(); } }