void Start ()
{
Debug.Log("Welcome to Number Wizard!");
Debug.Log("Pick a number! Keep it to yourself!");
Debug.Log("Highest pick is: " + maxGuess);
Debug.Log("Lowest pick is: " + minGuess);
Debug.Log("Tell me if your number is lower or higher than " + guess + ".");
Debug.Log("Push Up Arrow = Higher Guess, Push Down Arrow = Lower Guess, Push Space Bar = Correct!");
maxGuess = maxGuess + 1;
}
void Update ()
{
if (Input.GetKeyDown(KeyCode.DownArrow))
{
Debug.Log("You: The number held is lower!");
maxGuess = guess;
guess = (maxGuess + minGuess) / 2;
Debug.Log("Me: Still lower than " + guess + "?");
}
else if (Input.GetKeyDown(KeyCode.UpArrow))
{
Debug.Log("You: The number held is higher!");
minGuess = guess;
guess = (maxGuess + minGuess) / 2;
Debug.Log("Me: Still over than " + guess + "?");
}
else if (Input.GetKeyDown(KeyCode.Space))
{
Debug.Log("You: You are a wizard! The number is correct!");
}
}