Enforce Ingress-style link-crossing prevention

A new link can no longer cross any existing link from either team —
segmentsIntersect() does a standard orientation-based segment test,
and routes/links.ts excludes shared-endpoint pairs (fanning multiple
links out of the same portal is fine, that's not a crossing). 6 new
tests; 37 total passing.
This commit is contained in:
2026-08-05 13:33:06 +00:00
parent d6ef514c84
commit f0d437b60f
5 changed files with 151 additions and 3 deletions
+3
View File
@@ -44,6 +44,9 @@ Map's public API.
links running through it.
- A link can be created between any two places your team currently holds,
as long as you're standing at the origin place — no maximum link distance.
- A new link can't cross any existing link (either team) — same as Ingress.
Links sharing an endpoint don't count as crossing. See
`services/geo.ts#segmentsIntersect` and `routes/links.ts`.
- Three mutually-linked, same-team places form a field (computed live, not
stored) — see `server/src/services/fields.ts`.
- Team choice is one-way once made.