Implement Enhancements, Mainline modifiers and Maneuvers; fix unplayable track

This commit is contained in:
Jesse
2026-07-31 11:02:54 -04:00
parent 401b879140
commit b085d5a0bb
20 changed files with 1853 additions and 50 deletions
+9
View File
@@ -36,6 +36,7 @@ const straight = (standing: RollingStock[] = []): TrackCard => ({
standing,
facility: null,
modifiers: [],
enhancements: [],
});
/** A straight rotated to run north-south. Needed to meet the Office's junction stubs (Gap 11). */
@@ -45,6 +46,7 @@ const nsStraight = (standing: RollingStock[] = []): TrackCard => ({
standing,
facility: null,
modifiers: [],
enhancements: [],
});
const turnout = (o?: TurnoutOrientation): TrackCard => ({
@@ -55,6 +57,7 @@ const turnout = (o?: TurnoutOrientation): TrackCard => ({
standing: [],
facility: null,
modifiers: [],
enhancements: [],
});
const officeCard = (): TrackCard => ({
@@ -63,6 +66,7 @@ const officeCard = (): TrackCard => ({
standing: [],
facility: null,
modifiers: [],
enhancements: [],
});
const lockedFacility = (): TrackCard => ({
@@ -84,6 +88,7 @@ const lockedFacility = (): TrackCard => ({
usedThisStage: { laborers: 0, porters: 0 },
},
modifiers: [],
enhancements: [],
});
const car = (): RollingStock => ({ type: 'boxcar', loaded: false });
@@ -100,6 +105,9 @@ function areaFrom(cards: Record<string, TrackCard>, officeCoord: GridCoord): Off
limitsWest: { row: officeCoord.row, col: officeCoord.col - 2 },
limitsEast: { row: officeCoord.row, col: officeCoord.col + 2 },
adOccupancy: [],
heldAtLimits: [],
dispatchUsedToday: [],
trackSupply: new Map(),
};
}
@@ -159,6 +167,7 @@ describe('ports and geometry', () => {
standing: [],
facility: null,
modifiers: [],
enhancements: [],
};
assert.deepEqual(exitsFrom(r, 's'), ['w']);
});