diff options
| author | dax <me@dax.ist> | 2026-08-04 08:49:29 +0000 |
|---|---|---|
| committer | dax <me@dax.ist> | 2026-08-04 08:49:29 +0000 |
| commit | 51062d0579eba3c8137298a88963eb6aeb57c2e2 (patch) | |
| tree | ba7f576a6dd22929473f91ae0122afff79e343b9 /public/app.js | |
| parent | fe060ee95e000004bcdea9e8788d92cea33eaa80 (diff) | |
pathways: four directions lead to four distinct photos - dedupe per-photo next ids in exit generation (server), exclude other directions' targets from placement candidates (client)
Diffstat (limited to 'public/app.js')
| -rw-r--r-- | public/app.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/public/app.js b/public/app.js index e4fa727..98dcaed 100644 --- a/public/app.js +++ b/public/app.js @@ -253,9 +253,11 @@ function choosePlacement(id, dir) { if (!ex) return null const from = tiles.get(id).rect const seen = new Set() + const claimed = new Set() + if (exits) for (const e of exits) if (e.dir !== dir && e.next) claimed.add(e.next.id) const candIds = [] const addCand = (cid) => { - if (cid && !seen.has(cid) && !rectOf.has(cid)) { + if (cid && !claimed.has(cid) && !seen.has(cid) && !rectOf.has(cid)) { seen.add(cid) candIds.push(cid) } |
