title: Multi-player Random Number Game Java
body: <p>I'm trying to create a random MultiPlayer guessing game on Java and I'm having trouble with it. The code below is what I have so far. I need to insert code that will prompt the user to input how many people are playing. Once they do that and start guessing, the program should take guesses from each player until one guesses it correctly, in that case, that player will then be skipped until the rest of the players guess their numbers as well. The program assigns each user their own unique number. (Example: There are three players. Player one guesses 1. That's too low. Player two guesses 4. That's correct! Player three guesses 4. That's too high. Player one guesses 2. That's correct! Player three guesses 3. That's correct! ...etc)</p>
  
  <pre><code>import java.util.Random;
  import java.util.Scanner; 
  
  public class MultiRandGame {
  
      public static void main(String[] args) {
  
          Random rand = new Random();
          int NumGuess = rand.nextInt(101);
          int NumTries = 0;
          Scanner input = new Scanner(System.in); 
          int guess;
          boolean Game = false;
  
          while (Game == false) {
  
              System.out.println("Guess a number between 1 and a 100: ");
              guess = input.nextInt();
              NumTries++;
  
              if (guess == NumGuess) {
                  Game = true;
              }
  
              else if (guess &lt; NumGuess) {
                  System.out.println("Too low!");
  
              }
  
              else if (guess &gt; NumGuess) {
                  System.out.println("Too high!");
  
              }
          }
  
          System.out.println("You got it!");
          System.out.println("The number was " + NumGuess);
          System.out.println("It took you " + NumTries + " tries!");
  
      }
  }
  </code></pre>