for (int i = 0; i < heightInTiles; i++) { for (int j = 0; j < widthInTiles; j++) { if (map[i][j] != myMap.getNullTile()) { other.setTileAt(j+xOffset, i+yOffset, map[i][j]);
for (int y = bounds.y; y < bounds.y + bounds.height; y++) { for (int x = bounds.x; x < bounds.x + bounds.width; x++) { Tile tile = getTileAt(x, y); if (tile != myMap.getNullTile()) { other.setTileAt(x, y, tile);
    public void mergeOnto(MapLayer other) {        for (int i = 0; i < heightInTiles; i++) {            for (int j = 0; j < widthInTiles; j++) {                if (map[i][j] != myMap.getNullTile()) {                    other.setTileAt(j+xOffset, i+yOffset, map[i][j]);                }            }        }    }