using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NumberWizard : MonoBehaviour
{
private int _max = 1000;
private int _min = 1;
private int _guess = 500;
// Start is called before the first frame update
void Start()
{
Debug.Log("Konnichiwa , welcome to number wizard!");
Debug.Log("Please pick a number:");
Debug.Log("The highest number you can pick is: " + _max);
Debug.Log("The lowest you can pick is: " + _min);
Debug.Log("Tell me if you number is higher or lower than " + _guess);
Debug.Log("Push Up = Higher, Push Down = Lower, Push Enter = Correct");
_max++;
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.UpArrow))
{
Debug.Log("UpArrow key was pressed");
_min = _guess;
_guess = (_max + _min) / 2;
Debug.Log(_guess);
}
else if (Input.GetKeyDown(KeyCode.DownArrow))
{
Debug.Log("DownArrow key was pressed");
_max = _guess;
_guess = (_max + _min) / 2;
Debug.Log(_guess);
}
else if (Input.GetKeyDown(KeyCode.Return))
{
Debug.Log("Return key was pressed");
}
}
}
γγγ«γ‘γ―(konnichiwa), it means the greetring that βhow do you do?β.