My local greeting!

This is my local greeting!

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NumberWizard : MonoBehaviour
{
    int max = 1000;
    int min = 1;
    int guess = 500;

    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("Hallo iedereen! That's hello everyone in dutch, and welcome to... (where is the drumroll? Broken!? Alright alright...) Welcome to number wizard!");
        Debug.Log("please, pick a number. It can be any number... almost");
        Debug.Log("The HIGHEST number you can pick is... " + max);
        Debug.Log("The LOWEST number you can pick is... " + min);
        Debug.Log("Now... Is your number higher or lower then " + guess);
        Debug.Log("Push the up arrow if your number is higher, push the down arrow if it's lower and push enter if our guess was correct");
        max = max + 1;
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.UpArrow))
        {
            Debug.Log("Your number is higher! Interesting...");
            min = guess;
            guess = (max + min) / 2;
            Debug.Log("Is it... " + guess);
        }

        else if (Input.GetKeyDown(KeyCode.DownArrow))
        {
            Debug.Log("Your number is lower... let me think...");
            max = guess;
            guess = (max + min) / 2;
            Debug.Log("Is it maybe... " + guess);
        }

        else if (Input.GetKeyDown(KeyCode.Return))
        {
            Debug.Log("We guessed it! Whoo!!!");
        }
    }
}

Hello. Good Morning friends. Namaskar.

Privacy & Terms