This commit is contained in:
Forrest 2026-09-28 02:54:54 -04:00
parent e590baf28d
commit 6382de19c9
15 changed files with 239 additions and 28 deletions

View file

@ -5,8 +5,8 @@ import { GRID, LINES, LINES_AT, LOCATIONS, levelFor, otherEnd } from '../src/map
const RULES_MD = readFileSync(new URL('../../rules.md', import.meta.url), 'utf8');
test('24 lines, 20 of them with gateways', () => {
assert.equal(LINES.length, 24);
test('22 lines, 20 of them with gateways', () => {
assert.equal(LINES.length, 22);
assert.equal(LINES.filter((l) => l.gateway).length, 20);
});
@ -25,7 +25,7 @@ test('levels are mirrored between the players', () => {
const mirror = (loc: string) => ({ A: 'E', B: 'D', C: 'C', D: 'B', E: 'A' })[loc[0]]! + loc[1];
for (const loc of GRID) assert.equal(levelFor(0, loc), levelFor(1, mirror(loc)), loc);
assert.equal(levelFor(0, 'S1'), 1);
assert.equal(levelFor(0, 'A2'), 2);
assert.equal(levelFor(0, 'A2'), 1);
assert.equal(levelFor(0, 'B1'), 2);
assert.equal(levelFor(0, 'C2'), 3);
assert.equal(levelFor(0, 'D1'), 4);