static BufferedImage tilesToImage_twoLevelList(LL tiles) { if (empty(tiles)) null; int columns = maxLength(tiles); int rows = l(tiles); int w = intSum(mapMethod getWidth(first(tiles))); int h = intSum(mapMethod getWidth(map first(tiles))); BufferedImage img = newBufferedImage(w, h); int yy = 0; for y to rows: { int xx = 0, th = 0; for x to columns: { BufferedImage tile = get(tiles.get(y), x); if (tile != null) { copyBufferedImage(tile, img, xx, yy); xx += tile.getWidth(); th = tile.getHeight(); } } yy += th; } ret img; }