feat(walls): door refusals and secret/locked equivalence gate (#56)
- door.set: opening a secret or locked door is invalid; closing either is allowed; a fixed window/non-door still has no open state. - new tools/doors.test.mjs: two fresh servers, one identical script, three equivalence pairs (secret/wall, secret+locked/wall, locked/closed door), canonicalised frame + full per-player tile sweeps, an open-door positive control and a pinned zero-thickness close-push. - secretgap fault hook (sight-only) makes the pair fail as exactly SECRETGAP; the clean pair passes and the shipped binary carries no fault hook. - docs/TESTING.md T2/T17 and the door-equivalence/10.3 sections: built. Ref #56
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ proc cellOf*(sc: SceneRec, idx: int): (int, int) =
|
||||
proc computePolys*(sc: SceneRec, tokens: seq[TokenRec], playerId: int): seq[Poly] =
|
||||
## One polygon per token of this player that has vision, in token order (a stable wire order).
|
||||
if playerId <= 0: return
|
||||
let walls = geometryWalls(sc)
|
||||
let walls = geometryWalls(sc, forSight = true)
|
||||
for t in tokens:
|
||||
if t.owner != playerId or not t.hasVision: continue
|
||||
result.add Poly(tokenId: t.id,
|
||||
|
||||
Reference in New Issue
Block a user