public static void Main()
{ Console.WriteLine("Enter a number between 1 and 10\nThe computer will try and guess a number, and if it is +/- 1 from your number, it wins. "); }
{ Console.WriteLine("Enter your new number: "); }
int playerNum = Convert.ToInt32(Console.ReadLine());
Random computer = new Random();
int AI = computer.Next(11);
if (AI - 1 == playerNum | AI + 1 == playerNum | AI == playerNum)
{ Console.WriteLine("The AI guessed "+AI+", so you lose!"); }
{ Console.WriteLine("The AI guessed "+AI+", so you win!"); }