Draw the board as track, split the site into three pages, and fix curve geometry

Adds SVG board rendering shared by the game and the replay, a splash page with a
shareable replay directory, hover tooltips for reference detail, and makes curves
two-port arcs so sidings and run-arounds can finally be built.
This commit is contained in:
Jesse
2026-08-01 13:35:53 -04:00
parent f00255ce31
commit f52ff0e9ac
21 changed files with 5359 additions and 291 deletions
+9
View File
@@ -58,6 +58,13 @@ export type TurnoutOrientation = { stem: 'n' | 's' | 'e' | 'w'; through: 'n' | '
* how many run each way, yet a layout with no north-south straight can never use the Office's
* junction stubs at all.
*/
/**
* A curve joins two ADJACENT edges. There are exactly four such arcs, and a card can be turned to
* any of them — which is what makes a siding possible: an arc reaching NORTH is the only way back
* up to the Running Track from the district below.
*/
export type TrackArc = 'ne' | 'nw' | 'se' | 'sw';
export type TrackAxis = 'ew' | 'ns';
export type CardGeometry =
@@ -66,6 +73,8 @@ export type CardGeometry =
geometry: TrackGeometry;
turnout?: TurnoutOrientation;
axis?: TrackAxis;
/** Which two edges a CURVE joins — chosen on placement, since the card can be turned. */
arc?: TrackArc;
/** Curves are printed left- or right-handed (design supply); not chosen on placement. */
hand?: 'left' | 'right';
}