code: public static void clearOutput(int newlines) {
          char[] chars = new char[newlines];
          Arrays.fill(chars, '\n');
          System.out.println(chars);
      }
docs: Clears the output of the console between results printed by {@link #printSearch(java.util.Iterator, Maze2D)}.
  
  @param newlines number of new lines