Всем привет! Greetings from Russia

Hello to all! My name is Oleg, I live in Russia, and more precisely in Moscow. I wanted to start doing something like this for a long time, but I could not find anything suitable, but when I found you, I was overwhelmed with joy, now watch your videos every day. Thank you so much for your work !!
int max = 1000;
int min = 10;
int lastmax, lastmin, guess = 500;
void Start () {
Debug.Log(“Здарово, and welcom to number wizerd”);
Debug.Log(“Pick number, don’t tell what is it…”);
Debug.Log("The highest number you can pick is: " + max);
Debug.Log("The lowest number you can pick is: " + min);
Debug.Log(“Push Up = highest; Push Down = lowest; Push Enter = Correct”);
max = max + 1;
lastmax = max;
lastmin = min;
}
void Update () {
if (Input.GetKeyDown(KeyCode.UpArrow))
{
if (min < max)
{
Debug.Log(“You hit up, and caused highest number”);
max = guess;
guess = (max + min) / 2;
Debug.Log("Highest = " + max);

        } else
        {
            Debug.Log("This program doesn't work");
        }
    }
    else if (Input.GetKeyDown(KeyCode.DownArrow))
    {
        if (max > min)
        {
            Debug.Log("You hit down, and caused lowest number");
            min = guess;
            guess = (max + min) / 2;
            Debug.Log("Lowest = " + min);
        } else
        {
            Debug.Log("This program doesn't work");
        }
    }
    else if (Input.GetKeyDown(KeyCode.Return))
    {
        Debug.Log("You hit Enter");
        min = lastmin;
        max = lastmax;
    }
}

Privacy & Terms