This is my number wizard code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NumberWizard : MonoBehaviour
{
int maxGuess = 1000;
int lowestGuess = 1;
int botGuess = 500;
// Use this for initialization
void Start()
{
Debug.Log("Welcome to Number Wizard, Enjoy");
Debug.Log("Pick a Ramdom Number");
Debug.Log("Don't be a Gumbo and Change Your Number"); // Gumbo is a yummy stew, My friends use it as a insult tho
Debug.Log("The Highest Number You Can Pick is: " + maxGuess);
Debug.Log("The Lowest Number You Can Pick is: " + lowestGuess);
Debug.Log("Is Your Number Higher or Lower Then " + botGuess + "?");
Debug.Log("Push The Up Arrow Key For Higher, Push The Down Arrow Key For Lower, Press The Enter Key For Correct");
maxGuess = maxGuess + 1;
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.UpArrow))
{
lowestGuess = botGuess;
botGuess = (maxGuess + lowestGuess) / 2;
Debug.Log("Ok How About... " + botGuess + "?");
}
else if (Input.GetKeyDown(KeyCode.DownArrow))
{
maxGuess = botGuess;
botGuess = (maxGuess + lowestGuess) / 2;
Debug.Log("Ok How About... " + botGuess + "?");
}
else if (Input.GetKeyDown(KeyCode.Return))
{
botGuess = 500;
Debug.Log("Yay I Win!! Same Thing Again Think of a New Number. My First Guess Is " + botGuess + "?");
}
}
}