using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NumberGame : MonoBehaviour
{
int max = 1000;
int min = 1;
int guess = 500;
// Start is called before the first frame update
void Start()
{
Debug.Log("Ekaabo Sori Ere Numba");
Debug.Log("Pick A Number, don't tell me what it is...");
Debug.Log("The highest number you can pick is: " + max);
Debug.Log("The lowest number you can pick is: " + min);
Debug.Log("Tell me if your number is higher or lower than 500");
Debug.Log("Push Up = Higher, Push Down = Lower, Push Enter = Correct");
max = max + 1;
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.UpArrow))
{
Debug.Log("You have just pushed the UpArrow Key.");
min = guess;
guess = (max + min) / 2;
Debug.Log(guess);
}
else if (Input.GetKeyUp(KeyCode.DownArrow))
{
Debug.Log("You have just pushed the DownArrow Key.");
max = guess;
guess = (max + min) / 2;
Debug.Log(guess);
}
else if (Input.GetKeyDown(KeyCode.Return))
{
Debug.Log("O gba!!! Mo ti je Ebun Ago Owo Kan.");
}
}
}