My Number Wizard introduction, with code. he's very drunk

Welcm’ to th’ Number Wizzerd dude. Don’t stare at the void oer’ there, it’ll stare right back 'iwill.

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

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

    // Use this for initialization
    void Start ()
    {

        Debug.Log("Welcm' to th' Number Wizzerd dude. Don't stare at the void oer' there, it'll stare right back 'iwill.");
        Debug.Log("Thinkve a number! It'cn only be about 1 to 1000 though.");
        Debug.Log("To be clear, the highest number is: " + max);
        Debug.Log("and the lowest number is: " + min);
        Debug.Log("Is'yer number higher er lower than " + guess + "?");
        Debug.Log("And no lyin! I'jst get confused.");
        Debug.Log("UP = Higher, DOWN = Lower, ENTER = Correct");
        max = max + 1;
	}
	
	// Update is called once per frame
	void Update ()
    {
        if (Input.GetKeyDown(KeyCode.UpArrow))
        {
            Debug.Log(guess);
            min = guess;
            guess = (max + min) / 2;
            Debug.Log("Higher'hmmm? How bout " + guess + "?");
        }
        else if (Input.GetKeyDown(KeyCode.DownArrow))
        {
            Debug.Log(guess);
            max = guess;
            guess = (min + max) / 2;
            Debug.Log("Lower?! ...mmmhow bout " + guess + "?");
        }
        else if (Input.GetKeyDown(KeyCode.Return))
        {
            Debug.Log("'N you thought I's a hack! Hah!");
        }
    }
}

That’s good drunk speak.

Privacy & Terms