srecord noeq G22Tiling(Image img) { new L tiles; // for each pixel: tile index+1 (or 0 for empty) int[] tileMatrix; // index = dual log of tile size, value = tile index //new L tilesBySize; sclass Tile { Rect position; // Lists of neighbors in all 4 directions (index like NESWDirection) // (If only a corner is touching, it's not a neighbor.) Cl[] neighbors = new Cl[4]; } }