java - How do I allow a maze program to continuously move a character if an "if" statement is satisified? -


I am trying to change a maze and I have the character in the maze without input to me Maze.moveRight ( ); every time

  public square P4 {public static zero main (string [] args) {// maze string filename = Args [0]; Maze = new maze (filename); System.out.println ("maze name:" + filename); // Get the dimensions of the dimensions Width = maze.getWidth (); Int mazeHeight = Maze Heights (); System.out.println ("Table Width:" + Magwidth); System.out.println ("maze height:" + maze hit); Int line = 0; Int col = 0; If (line & lt; mazeHeight-1) {line ++; }}}    

If the statement will be executed only once. Instead of using the loop for a while

  public square P4 {public static zero main (string [] args) {// maze string filename = args [0]; Maze = new maze (filename); System.out.println ("maze name:" + filename); // Get the dimensions of the dimensions Width = maze.getWidth (); Int mazeHeight = Maze Heights (); System.out.println ("Table Width:" + Magwidth); System.out.println ("maze height:" + maze hit); Int line = 0; Int col = 0; While (line & lt; mazeHeight-1) {line ++; }   

In addition, you should provide better context for the question.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -