Debug.Log(“Hello Mortal, welcome to Number Wizard”);
Debug.Log(“Think of a Number. Keep it to yourself, Swine.”);
Debug.Log(“The minimum number is 1”);
Debug.Log(“The maxiumum number is 100”);
Debug.Log(“Is your number higher or lower than 50?”);
Debug.Log(“UP = Higher, DOWN = Lower, ENTER = Correct”);
{
if (Input.GetKeyDown(KeyCode.DownArrow))
{
Debug.Log(“The Number is Lower. Is this the correct number?”);
max = guess;
guess = (max + min) / 2;
Debug.Log(guess);
}
else if (Input.GetKeyDown(KeyCode.UpArrow))
{
Debug.Log(“The Number is Higher. Is this the correct number?”);
min = guess;
guess = (max + min) / 2;
Debug.Log(guess);
}
else if (Input.GetKeyDown(KeyCode.Return))
{
Debug.Log(“The Number is Correct”);
}