public void parseMap() {
        Tile[][] ret = null;
        Scanner read = null;
        try {
            read = new Scanner(this.mapFile);
            int mapwidth = read.nextInt();
            int mapheight = read.nextInt();
            read.nextLine();
            ret = new Tile[mapwidth][mapheight];
            for (int i = 0; i < mapheight; i++) {
                String line = read.nextLine();
                for (int j = 0; j < mapwidth; j++) {
                    TileType t;
                    switch (line.charAt(j)) {
                        case '#':
                            t = TileType.TILE_HARDBLOCK;
                            break;
                        case '?':
                            t = TileType.TILE_SOFTBLOCK;
                            break;
                        case '$':
                            t = TileType.TILE_TREASURE;
                            break;
                        case '.':
                            t = TileType.TILE_FLOOR;
                            break;
                        default:
                            t = TileType.TILE_FLOOR;
                    }
                    ret[i][j] = new Tile(j, i, t, this);
                }
            }
        } catch (FileNotFoundException ex) {
            System.out.println("DBG: File not found");
            throw new RuntimeException("cannot continue without map");
        } finally {
            if (read != null) {
                read.close();
            }
        }
        this.map = ret;
    }