feat(airport): bind landings to the six visual flats

Entry side is the 60-degree wedge of the port, not the cell-edge direction. Levels regenerated; hint line joins the waiting plane to the on-board path.
This commit is contained in:
toshiocn
2026-09-21 17:55:06 +08:00
parent 0e67c4c188
commit c99716b1d5
8 changed files with 1157 additions and 1128 deletions
+6 -4
View File
@@ -122,11 +122,13 @@ const output = [];
for (let j = 0, n = 2 + Math.floor(rng() * 7); j < n; j++) { const c = cells[Math.floor(rng() * cells.length)]; c.tracks = randomTracks(rng); }
const options = candidates(cells);
for (const opt of options) {
const s0 = opt.sides[0];
const probe = base(cells, [{ id: 'P1', q: opt.q, r: opt.r, color: 8 }], []);
if (uniquenessIssues(probe).length) continue;
const cat = catalogs(probe);
for (let side = 0; side < 6; side++) {
if (s0.includes(side)) continue;
const d = opt.sides[1].includes(side) ? 1 : opt.sides[5].includes(side) ? -1 : 0;
if (!d) continue;
const at0 = cat[0].arrivals.some(r => r.side === side);
const turn = cat[1].arrivals.some(r => r.side === side) ? 1 : cat[5].arrivals.some(r => r.side === side) ? -1 : 0;
if (at0 || !turn) continue;
const level = base(cells, [{ id: 'P1', q: opt.q, r: opt.r, color: 8 }], [{ id: 'in1', color: 8, side }]);
if (uniquenessIssues(level).length) continue;
const st0 = createState(level); st0.orientation = 0;