title: How to make unity not pick the same number twice?
body: <p>The program is a simple number guessing game however when i randomize the guesses unity tends to pick the same number multiple times is there a way to have it know what numbers it already picked? an also is there a way to make it automatically go to the lose scene if it can't pick another number? any help is appreciated ^_^</p>
  
  <pre><code>using UnityEngine;
  using UnityEngine.UI;
  using System.Collections;
  
  public class NumberGuesser : MonoBehaviour {
  
  int min;
  int max;
  int guess;
  int maxGuessesAllowed = 15;
  public Text text;
  //guess = (max + min) / 2;
  
  // Use this for initialization
  void Start () {
      min = 1;
      max = 1000;
      NextGuess();
      max = max + 1;
  }
  
  // Update is called once per frame
  public void guessHigher () {
      min = guess;
      NextGuess ();
  }
  public void guessLower() {
          max = guess;
          NextGuess();
      }
  void NextGuess(){
      guess = (max + min) / 2;
      //guess = Random.Range (min,max);//Randomizes Guesses
      //print (guess);
      text.text = guess.ToString ();
      maxGuessesAllowed = maxGuessesAllowed - 1;
      if (maxGuessesAllowed &lt;= 0) {
          Application.LoadLevel ("Win");
      }
  }
  }//main
  </code></pre>