make turnout description more clear. fix curves from breaking running track.

This commit is contained in:
Jesse
2026-08-05 10:03:50 -04:00
parent 9c76b1a5e2
commit 1c321d4cea
9 changed files with 226 additions and 28 deletions
+6
View File
@@ -50,6 +50,7 @@ import type { Occupancy, Port } from './track.ts';
import {
canDropCarsAt,
canPlaceAt,
carriesThroughTrack,
facilityVariants,
opposite,
reachableDestinations,
@@ -590,6 +591,11 @@ function checkPlay(
{
const proto = protoCard(card.kind, variant);
if (!proto) return 'NO_PLACEMENT';
// Said separately from NOT_CONNECTED because it is a different mistake: the card would join
// perfectly well, and would still leave the Running Track stopping dead at it.
if (placement.row === area.runningRow && !carriesThroughTrack(proto)) {
return 'BREAKS_RUNNING_TRACK';
}
return canPlaceAt(area, placement, proto) ? null : 'NOT_CONNECTED';
}