title: MasterMind Game-Java
body: <p>So I started working on a project involving the game MasterMind.  I am now completely lost and have no idea what to do next to complete the game.  I do not want in run as an applet, just in the console area.  BTW this is run on eclipse.  I am also having a problem with my if statement.  It tells me that the operands are incompatible.  The error code is: Incompatible operand types Scanner and Int[].</p>
  
  <pre><code>package masterMind;
  
  import java.util.Scanner;
  
  public class MasterMind {
  
      public static void main(String[] args) {
          System.out.println("This is MasterMind, a logic game");
          System.out.println("To win you must guess correctly where each number is(The Numbers Range from 1-4)");
          System.out.println("You will be told if you get one correct");
          System.out.println("You will only get 10 tries, then you lose");
          System.out.println("Lets begin");
  
  
          //Declare Array
          int [] answerArray;
  
          answerArray= new int [4];
          //Initialize Array
          //Change these value to change the answers needed to win
          answerArray[0]=2;
          answerArray[1]=3;
          answerArray[2]=2;
          answerArray[3]=2;
          //Create Board
          System.out.println("__ __ __ __");
  
          Scanner userGuess = new Scanner(System.in);
          int num = userGuess.nextInt();
  
          boolean guessedAll = false;
           int guessedCount=0;
           int tryCounter=0;
           while(tryCounter&lt;9 || !guessedAll){
          if (userGuess==answerArray) {
  
          } else {
  
          }
          //if number equals one of the numbers above then guessedCount++ ...
          //if guessedCount==4 then guessedAll=true 
           tryCounter++;
          }
      }
  }
  </code></pre>