void Update()
{
if(Input.GetKeyDown(KeyCode.UpArrow))
{
Debug.Log("Be honest, was your guess lower than: " + min + "?");
min = guess;
guess = (max + min) / 2;
Debug.Log(guess);
}
else if (Input.GetKeyDown(KeyCode.DownArrow))
{
Debug.Log("No lies! Was it higher than: " + max + "?");
max = guess;
guess = (max + min) / 2;
Debug.Log(guess);
}
else if (Input.GetKeyDown(KeyCode.Return))
{
Debug.Log("Don't stiff me now, is " + guess + " correct?");
}
}
2 Likes
Hello There