using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NumberWizzard : MonoBehaviour {
int max = 1000;
int min = 1;
int guess = 500;
// Start is called before the first frame update
void Start()
{
Debug.Log("Salut, bine ai venit la number wizzard");
Debug.Log("Pick a number player 1");
Debug.Log("The highest number allowed is " + max);
Debug.Log("The lowest number allowed is " + min);
Debug.Log("Tell me if your number is higher or lower than " + guess);
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))
{
int min = guess;
guess = (max + min) / 2;
Debug.Log("It's your number higher or lower than " + guess);
}
else if (Input.GetKeyDown(KeyCode.DownArrow))
{
int max = guess;
guess = (max + min) / 2;
Debug.Log("It's your number higher or lower than " + guess);
}
else if (Input.GetKeyDown(KeyCode.Return))
{
Debug.Log("Enter key was pressed.");
}
}
}