aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/app.js4
-rw-r--r--public/index.html4
2 files changed, 5 insertions, 3 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)
}
diff --git a/public/index.html b/public/index.html
index 51e3ef3..1134334 100644
--- a/public/index.html
+++ b/public/index.html
@@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="dark">
<title>pathways</title>
- <link rel="stylesheet" href="/app.css?v=9">
+ <link rel="stylesheet" href="/app.css?v=10">
</head>
<body>
<main id="stage">
@@ -16,6 +16,6 @@
<p>four paths, one per direction. walk them.<br><span class="hint">drag or scroll to pan · pinch to zoom · double-click empty space or press 0 to fit</span></p>
<button id="start">start</button>
</div>
- <script src="/app.js?v=9"></script>
+ <script src="/app.js?v=10"></script>
</body>
</html>