title: Easy Java 2D Array Maze Game
body: <p>I'm working on a maze game for a 2D array project. So far I have managed to make a randomized game board. Each time the program is run, the game board is randomized. The goal is to get 'P' (player) from the top right corner to 'E' (end) bottom left corner while avoiding 'X' and '*'. I need help making a method which allows the player to input Up, Down, Right, Left and make P move. This is what I have so far:</p>
  
  <pre><code>public class MazeGame {
  //Declare scanner to allow user to input directional commands
  Scanner move = new Scanner(System.in);
  
  public static void main(String[] args) {
      //Call methods
      Game_Beginning();
      Game_Board();     
  }
  
  //Intro to the game
  public static void Game_Beginning(){
             System.out.println("This is your game board:");
      System.out.println("-------------------------------");
  }
  
  //Game Board
  public static void Game_Board(){
      //Declare new array, maze 10x10
      char maze[][] = new char[10][10];
  
      //Randomly print the obstacles in the maze.
      for (int i = 0; i &lt; maze.length; i++){
          for (int j = 0; j &lt; maze.length; j++){
              double random = Math.random();
              if (random &lt;= .05){
                  maze[i][j] = '*';
              }
              else if (random &gt; .06 &amp;&amp; random &lt;= .15){
                  maze[i][j] = 'X';
              }
              else{
                  maze[i][j] = '.';
              }
              maze[0][0] = 'P';
              maze[9][9] = 'E';
              System.out.print(maze[i][j]);
          }
          System.out.println("");
      }
  
  
  }
  
  /**
   *  Add a method called "makePMove." Define char right, char left and so on
   */
  public static void makeMove(){
      int row;
      int col;
      System.out.print("Enter your move (Up-Down-Left-Right): ");
  
  }
  </code></pre>
  
  <p>}</p>