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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user