code: public static Maze2D read(File file) throws IOException {
          ArrayList<String> array = new ArrayList<String>();
          BufferedReader br = new BufferedReader(new FileReader(file));
          String line;
          while ((line = br.readLine()) != null) {
              array.add(line);
          }
          br.close();
          return new Maze2D((String[]) array.toArray());
      }
docs: Read a maze from a file in plain text.
  
  @param file file with the plain ascii text.
  @return a new Maze2D.
  @throws IOException