Merge goalie-tester worktree: modes, 3v3 goalies, OOB faceoffs, CF deploy.

Bring main menu (1v1/3v3), scrimmage with nets and goalies, dead-puck
whistles at the nearest faceoff circle, skater board re-entry, and
Cloudflare Workers/Pages deploy config. Keep main jersey gear stack and
compact goalie floaters.
This commit is contained in:
ryanfitzpatrickio
2026-08-03 10:41:13 -05:00
parent 7d28facd68
commit f9aa382f30
18 changed files with 3121 additions and 130 deletions
+26 -1
View File
@@ -1,4 +1,8 @@
import { RINK, clampToRink, insideRink, randomIcePoint, rinkOutline, rinkPenetration } from '../shared/rink.js';
import {
FACEOFF_DOTS, MARKINGS, RINK,
clampToRink, insideRink, nearestFaceoffDot, puckPlayable,
randomIcePoint, rinkOutline, rinkPenetration,
} from '../shared/rink.js';
import { done, near, ok, section } from './harness.mjs';
section('penetration on the straights');
@@ -74,4 +78,25 @@ section('random points land on the ice');
}
}
section('faceoff dots');
{
ok(FACEOFF_DOTS.length === 9, 'nine faceoff dots');
ok(nearestFaceoffDot(0, 0).id === 'centre', 'centre ice → centre dot');
ok(nearestFaceoffDot(MARKINGS.zoneDotX, MARKINGS.faceoffDotZ).id === 'ez-pp', 'end-zone corner maps to itself');
const nearSide = nearestFaceoffDot(RINK.halfX + 2, MARKINGS.faceoffDotZ * 0.9);
ok(nearSide.id.startsWith('ez-p'), `puck past +X boards nearest end-zone (+ got ${nearSide.id})`);
const mid = nearestFaceoffDot(1, MARKINGS.faceoffDotZ);
ok(mid.id === 'nz-pp' || mid.id === 'centre', `near neutral +Z maps sensibly (${mid.id})`);
}
section('puck playable');
{
ok(puckPlayable(0, 0.02, 0).ok, 'centre ice is playable');
ok(!puckPlayable(RINK.halfX + 1, 0.02, 0).ok, 'past the end boards is dead');
ok(!puckPlayable(0, 3.5, 0).ok, 'over the glass is dead');
ok(!puckPlayable(0, -0.5, 0).ok, 'under the ice is dead');
ok(puckPlayable(0, 0.5, 0).ok, 'a lifted puck still on the ice plane is live');
}
done('rink');