feature-120-cell-more-inscriptions #24

Merged
bombinans merged 20 commits from feature-120-cell-more-inscriptions into main 2026-01-01 07:27:01 +00:00
Showing only changes of commit 1e59b55f5e - Show all commits

View File

@ -112,7 +112,7 @@ function overlap(c1, c2) {
return true; return true;
} }
} }
return overlap; return false;
} }
@ -146,21 +146,20 @@ export function gather_5cells() {
cells.push(cell); cells.push(cell);
} }
} }
//console.log(`From ${n.id}`);
//console.log(cells);
for( const cell of cells ) { for( const cell of cells ) {
let binned = false; let binned = false;
for( const bin of bins ) { for( const bin of bins ) {
const overlaps = bin.filter((b) => overlap(b, cell)); const overlaps = bin.filter((b) => overlap(b, cell));
console.log(bin);
console.log(cell);
console.log(overlaps);
if( overlaps.length === 0 ) { if( overlaps.length === 0 ) {
bin.push(cell); bin.push(cell);
binned = true; binned = true;
console.log("binned");
break; break;
} }
} }
if( !binned ) { if( !binned ) {
console.log(`new bin for ${JSON.stringify(cell)}`);
bins.push([ cell ]); bins.push([ cell ]);
} }
} }