using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NumberWizard : MonoBehaviour
{
// vars
int max = 1000;
int min = 1;
int guess = 500;
// Start is called before the first frame update
void Start()
{
Debug.Log("Salam Khosh omadid be bazi Wizard Number(Jadoye Adad)");
Debug.Log("Toye in bazi shoma bayad ye adad entekhab konid beyn kamtarin va bishtarin adadi ke ma beheton migim");
Debug.Log("Bishtarin Adadi ke mitonit entekhab konid :" + max);
Debug.Log("Kamtarin adadi ham ke mitonid entekhab konid :" + min);
Debug.Log("Khob Hala Be man begid ke adad shoma az hads man bishtare ya kamtar: " + guess);
Debug.Log("Chejori inkaro konid Felesh Bala ro bezanid yani balatare Felesh Paen Ro bezanid Yani Kamtar Enter Ro bezanid Yani hads ma doroste");
max = max + 1;
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.UpArrow))
{
Debug.Log("Shoma Goftid Bozorgtare");
min = guess;
guess = (max + min) / 2;
Debug.Log(guess + "aya adad shoma az hads dovom ma ham bozorgtare ya kochik tar ?");
}
else if (Input.GetKeyDown(KeyCode.DownArrow))
{
Debug.Log("Shoma Goftid Kochiktare");
max = guess;
guess = (max + min) / 2;
Debug.Log(guess + "aya adad shoma az hads dovom ma ham kochiktare ya bozorgtare?");
}
else if (Input.GetKeyDown(KeyCode.Return))
{
Debug.Log("Hadsemon Dorost Bod Yohooo");
}
}
}