From a1328abb14792b0c12ef67e9c622a9de920ecd2d Mon Sep 17 00:00:00 2001 From: zfilip Date: Sun, 23 Oct 2022 16:36:19 -0700 Subject: [PATCH] Update routes-generator.js Fix adding both directions for routes so that they are not duplicated. --- modules/routes-generator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/routes-generator.js b/modules/routes-generator.js index 627a41ce..bc4b8224 100644 --- a/modules/routes-generator.js +++ b/modules/routes-generator.js @@ -94,7 +94,7 @@ window.Routes = (function () { } const [from, exit, passable] = findOceanPath(ports[a].cell, ports[b].cell); if (!passable) return null; - formed[[a, b]] = true; formed[[b, a]] + formed[[a, b]] = true; formed[[b, a]] = true; const path = restorePath(ports[a].cell, exit, "ocean", from); return path; }