public ArrayList<ArrayList> parseMap(String fileName) {

        ArrayList<ArrayList> pathsList = null;
        ArrayList<Point.Double> path = null;
        int status;
        String lin;
        String[] puntos;
        Point.Double p;

        if (openFile(fileName) == FAIL) {
            return null;
        }

        while ((lin = readLine()) != null) {

            if (lin.matches(MAP)) {
                status = SMAP;
                pathsList = new ArrayList();
            } else if (lin.matches(PATH)) {
                status = SPATH;
                path = new ArrayList();
            } else if (lin.matches(COOR)) {
                status = SCOOR;
                
                lin = lin.replaceAll("\\s*", "");
                puntos = lin.split(",");
                p = new Point.Double();
                p.x = Integer.parseInt(puntos[0]);
                p.y = Integer.parseInt(puntos[1]);
                
                p.x = p.x * 32 + 16;
                p.y = p.y * 32 + 16;
                
                // Ponemos el punto al final de la lista
                path.add(path.size(), p);
            } else if (lin.matches(EPATH)) {
                status = SEPATH;
                
                // Ponemos el camino al final de la lista
                pathsList.add(pathsList.size(), path);
            } else if (lin.matches(EMAP)) {
                status = SEMAP;
            }
        }
        
        closeFile();
        
        return pathsList;
    }