diff --git a/results/bench.log b/results/bench.log index 6529912..e285e00 100644 --- a/results/bench.log +++ b/results/bench.log @@ -1,17 +1,17 @@ == prototype scene (60 walls, 8 tokens, radius 400, cell 32) == -1 poly (jittered start positions): n=2000 avg=0.036ms worst=0.065ms -6 polys (one 6-token party): n=500 avg=0.208ms worst=0.296ms -1 poly + cellsTouched (scanline): n=2000 avg=0.048ms worst=0.120ms -6 polys + cellsTouched (scanline): n=300 avg=0.268ms worst=0.343ms -1 poly + cellsTouchedOld (prototype reference): n=500 avg=0.720ms worst=1.428ms +1 poly (jittered start positions): n=2000 avg=0.037ms worst=0.082ms +6 polys (one 6-token party): n=500 avg=0.211ms worst=1.462ms +1 poly + cellsTouched (scanline): n=2000 avg=0.048ms worst=0.100ms +6 polys + cellsTouched (scanline): n=300 avg=0.267ms worst=0.402ms +1 poly + cellsTouchedOld (prototype reference): n=500 avg=0.720ms worst=1.433ms TARGET polygon+cells, prototype scene (prototype baseline 0.451): 0.048 ms vs <= 0.451 ms: PASS == 5k sparse: genScene(world=16384., n=5000, seed=1), avg walls in vision bbox 15.6 == -1 poly, 5k sparse: n=2000 avg=0.084ms worst=0.543ms -1 poly + cellsTouched, 5k sparse: n=2000 avg=0.096ms worst=0.567ms -1 move check (pathClear, cap-length step), 5k sparse: n=20000 avg=0.010ms worst=0.134ms -TARGET polygon, 5k-wall scene: 0.084 ms vs <= 1.0 ms: PASS +1 poly, 5k sparse: n=2000 avg=0.083ms worst=0.144ms +1 poly + cellsTouched, 5k sparse: n=2000 avg=0.097ms worst=0.749ms +1 move check (pathClear, cap-length step), 5k sparse: n=20000 avg=0.009ms worst=0.231ms +TARGET polygon, 5k-wall scene: 0.083 ms vs <= 1.0 ms: PASS == 5k dense: genScene(world=4096., n=5000, seed=1), avg walls in vision bbox 206.9 == -1 poly, 5k dense: n=2000 avg=1.284ms worst=3.178ms -1 poly + cellsTouched, 5k dense: n=2000 avg=1.328ms worst=3.148ms -1 move check (pathClear, cap-length step), 5k dense: n=20000 avg=0.009ms worst=0.055ms +1 poly, 5k dense: n=2000 avg=1.282ms worst=2.756ms +1 poly + cellsTouched, 5k dense: n=2000 avg=1.324ms worst=3.268ms +1 move check (pathClear, cap-length step), 5k dense: n=20000 avg=0.009ms worst=0.077ms (sink 6023672) diff --git a/results/mutation.log b/results/mutation.log index 60c6b96..64070f1 100644 --- a/results/mutation.log +++ b/results/mutation.log @@ -62,15 +62,20 @@ [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [OK] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -127,7 +132,7 @@ control: exit=0 expected_failed=0 ok [FAILED] prototype scene, all tokens, doors closed and opened [FAILED] random wall fields, cell 32 and 25 [OK] negative control: the oracle notices a missing and an invented cell -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tgeometry' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tgeometry' [OK] crossing blocked, parallel ok [OK] grazing an endpoint is blocked [OK] no leak through shared vertex @@ -158,15 +163,20 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tge [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [OK] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -225,7 +235,7 @@ a: exit=1 expected_failed=1 ok [FAILED] prototype scene, all tokens, doors closed and opened [OK] random wall fields, cell 32 and 25 [OK] negative control: the oracle notices a missing and an invented cell -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tgeometry' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tgeometry' [OK] crossing blocked, parallel ok [OK] grazing an endpoint is blocked [OK] no leak through shared vertex @@ -256,15 +266,20 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tge [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [OK] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -324,7 +339,7 @@ b: exit=1 expected_failed=2 ok [FAILED] prototype scene, all tokens, doors closed and opened [OK] random wall fields, cell 32 and 25 [OK] negative control: the oracle notices a missing and an invented cell -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tgeometry' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tgeometry' [OK] crossing blocked, parallel ok [OK] grazing an endpoint is blocked [OK] no leak through shared vertex @@ -355,15 +370,20 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tge [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [OK] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -423,7 +443,7 @@ c: exit=1 expected_failed=2 ok [OK] prototype scene, all tokens, doors closed and opened [OK] random wall fields, cell 32 and 25 [OK] negative control: the oracle notices a missing and an invented cell -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tgeometry' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tgeometry' [OK] crossing blocked, parallel ok [OK] grazing an endpoint is blocked [OK] no leak through shared vertex @@ -454,15 +474,20 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tge [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [OK] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -521,7 +546,7 @@ d1: exit=1 expected_failed=1 ok [OK] prototype scene, all tokens, doors closed and opened [OK] random wall fields, cell 32 and 25 [OK] negative control: the oracle notices a missing and an invented cell -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tgeometry' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tgeometry' [OK] crossing blocked, parallel ok [OK] grazing an endpoint is blocked [OK] no leak through shared vertex @@ -552,15 +577,20 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tge [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [OK] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -617,7 +647,7 @@ d2: exit=1 expected_failed=1 ok [FAILED] prototype scene, all tokens, doors closed and opened [FAILED] random wall fields, cell 32 and 25 [FAILED] negative control: the oracle notices a missing and an invented cell -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tgeometry' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tgeometry' [OK] crossing blocked, parallel ok [OK] grazing an endpoint is blocked [OK] no leak through shared vertex @@ -648,15 +678,20 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tge [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [OK] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -681,7 +716,7 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tge e: exit=1 expected_failed=4 ok ## f: escape rule without the crossing check # diff server/moverules.nim -> mutated copy: -# 90c90 +# 106c106 # < if pathCrosses(s, d, w.a, w.b) or segDist(d, w.a, w.b) < r: return false # --- # > if segDist(d, w.a, w.b) < r: return false @@ -748,15 +783,20 @@ e: exit=1 expected_failed=4 ok [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [OK] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -764,7 +804,7 @@ e: exit=1 expected_failed=4 ok [FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross [OK] an unrelated wall change elsewhere does not re-block a GM-cleared token [OK] no escape hatch: a player cannot walk through any wall of a boxed room -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmoverules' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tmoverules' [OK] P1: probes longer than the cap get one fixed nack regardless of the scene [OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes [OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail) @@ -779,7 +819,7 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmo f: exit=1 expected_failed=1 ok ## g: GM moves checked against walls # diff server/moverules.nim -> mutated copy: -# 114c114 +# 130c130 # < if not inBounds(sc, d): return nack(s) # --- # > if not inBounds(sc, d) or not pathClear(sc.walls, s, d, sc.tokenRadius): return nack(s) @@ -846,15 +886,20 @@ f: exit=1 expected_failed=1 ok [FAILED] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [FAILED] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [FAILED] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [FAILED] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -862,7 +907,7 @@ f: exit=1 expected_failed=1 ok [FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross [OK] an unrelated wall change elsewhere does not re-block a GM-cleared token [OK] no escape hatch: a player cannot walk through any wall of a boxed room -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmoverules' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tmoverules' [OK] P1: probes longer than the cap get one fixed nack regardless of the scene [OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes [OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail) @@ -877,7 +922,7 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmo g: exit=1 expected_failed=1 ok ## h: capsule = centre path + destination circle (prototype) # diff server/moverules.nim -> mutated copy: -# 91c91 +# 107c107 # < elif segsCross(s, d, w.a, w.b) or segSegDist(s, d, w.a, w.b) < r: return false # --- # > elif segsCross(s, d, w.a, w.b) or segDist(d, w.a, w.b) < r: return false @@ -944,15 +989,20 @@ g: exit=1 expected_failed=1 ok [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [OK] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -960,7 +1010,7 @@ g: exit=1 expected_failed=1 ok [OK] GM manual clear inside a wall: player escapes sideways, cannot cross [OK] an unrelated wall change elsewhere does not re-block a GM-cleared token [OK] no escape hatch: a player cannot walk through any wall of a boxed room -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmoverules' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tmoverules' [OK] P1: probes longer than the cap get one fixed nack regardless of the scene [OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes [OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail) @@ -976,7 +1026,7 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmo h: exit=1 expected_failed=2 ok ## i: no step cap # diff server/moverules.nim -> mutated copy: -# 119d118 +# 135d134 # < if hypot(dd.x, dd.y) > stepCap(sc, sc.tokens[ti]): return nack(s) [OK] open space is a circle [OK] wall blocks @@ -1041,15 +1091,20 @@ h: exit=1 expected_failed=2 ok [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [OK] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -1057,13 +1112,13 @@ h: exit=1 expected_failed=2 ok [OK] GM manual clear inside a wall: player escapes sideways, cannot cross [OK] an unrelated wall change elsewhere does not re-block a GM-cleared token [OK] no escape hatch: a player cannot walk through any wall of a boxed room -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmoverules' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tmoverules' [FAILED] P1: probes longer than the cap get one fixed nack regardless of the scene [OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes [OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail) [OK] P4: probing cannot unflag or move a blocked token [OK] doors beyond the bound: opening or closing them changes no reply -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tprobing' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tprobing' [OK] exactly n walls, deterministic per seed, seeds differ [OK] doors are every 10th wall, all closed; walls stay inside the world (+- jitter) [OK] walls are non-degenerate and axis-ish segments of room-edge length @@ -1074,7 +1129,7 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tpr i: exit=1 expected_failed=2 ok ## j: blocked trigger needs the centre on the wall # diff server/moverules.nim -> mutated copy: -# 100c100 +# 116c116 # < proc overlaps(sc: Scene, t: Token, w: Wall): bool = segDist(t.pos, w.a, w.b) < sc.tokenRadius # --- # > proc overlaps(sc: Scene, t: Token, w: Wall): bool = segDist(t.pos, w.a, w.b) < 1e-9 @@ -1141,15 +1196,20 @@ i: exit=1 expected_failed=2 ok [OK] GM: ignores walls, step cap and blocked; bounds still apply [FAILED] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [FAILED] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [FAILED] blocked token: player moves refused, GM move allowed [FAILED] cleared by removing the wall; unrelated removals keep it [FAILED] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [FAILED] wall update = remove then add [FAILED] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [FAILED] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [FAILED] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [FAILED] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [FAILED] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [FAILED] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [FAILED] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [FAILED] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [FAILED] KEEP: wall update away from one of two overlapping walls keeps blocked [FAILED] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -1157,7 +1217,7 @@ i: exit=1 expected_failed=2 ok [FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross [OK] an unrelated wall change elsewhere does not re-block a GM-cleared token [OK] no escape hatch: a player cannot walk through any wall of a boxed room -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmoverules' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tmoverules' [OK] P1: probes longer than the cap get one fixed nack regardless of the scene [OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes [OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail) @@ -1168,12 +1228,12 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmo [OK] walls are non-degenerate and axis-ish segments of room-edge length # test exit=1; expected tests failed: 2 [FAILED] wall added within r of the circle (centre not on it) sets blocked; exactly r does not - [FAILED] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it + [FAILED] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too j: exit=1 expected_failed=2 ok ## k: removal/open clears blocked unconditionally (no KEEP) # diff server/moverules.nim -> mutated copy: -# 144c144 +# 161c161 # < if overlaps(sc, sc.tokens[i], w): sc.tokens[i].blocked = overlapsAny(sc, sc.tokens[i]) # --- # > if overlaps(sc, sc.tokens[i], w): sc.tokens[i].blocked = false @@ -1240,15 +1300,20 @@ j: exit=1 expected_failed=2 ok [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [OK] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [OK] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [FAILED] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [FAILED] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [FAILED] KEEP: wall update away from one of two overlapping walls keeps blocked [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -1256,7 +1321,7 @@ j: exit=1 expected_failed=2 ok [OK] GM manual clear inside a wall: player escapes sideways, cannot cross [OK] an unrelated wall change elsewhere does not re-block a GM-cleared token [OK] no escape hatch: a player cannot walk through any wall of a boxed room -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmoverules' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tmoverules' [OK] P1: probes longer than the cap get one fixed nack regardless of the scene [OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes [OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail) @@ -1272,7 +1337,7 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmo k: exit=1 expected_failed=2 ok ## l: GM moves never set or clear blocked # diff server/moverules.nim -> mutated copy: -# 122d121 +# 139d138 # < if who.role == roleGM: sc.tokens[ti].blocked = overlapsAny(sc, sc.tokens[ti]) [OK] open space is a circle [OK] wall blocks @@ -1337,15 +1402,20 @@ k: exit=1 expected_failed=2 ok [OK] GM: ignores walls, step cap and blocked; bounds still apply [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does - [OK] open door added or opened never sets; closing a door on a token does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets [FAILED] blocked token: player moves refused, GM move allowed [OK] cleared by removing the wall; unrelated removals keep it [OK] cleared by opening the door; a second open is a no-op [OK] cleared by the GM; not re-set by itself [OK] wall update = remove then add [FAILED] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear - [FAILED] Q14: a door closed 10 px from a token: token blocked, player refused, GM moves it clear, opening frees it - [OK] doorway: token in an open doorway, door closes -> blocked, door opens -> free + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees [OK] KEEP: wall update away from one of two overlapping walls keeps blocked [FAILED] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked @@ -1353,7 +1423,7 @@ k: exit=1 expected_failed=2 ok [FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross [OK] an unrelated wall change elsewhere does not re-block a GM-cleared token [OK] no escape hatch: a player cannot walk through any wall of a boxed room -Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmoverules' +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tmoverules' [OK] P1: probes longer than the cap get one fixed nack regardless of the scene [OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes [OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail) @@ -1368,4 +1438,316 @@ Error: execution of an external program failed: '/tmp/tmp.l2QZ72lVaE/w/tests/tmo [FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross l: exit=1 expected_failed=3 ok +## m: door push: wrong side first +# diff server/moverules.nim -> mutated copy: +# 202c202 +# < for sg in [(if side > 0: 1.0 else: -1.0), (if side > 0: -1.0 else: 1.0)]: +# --- +# > for sg in [(if side > 0: -1.0 else: 1.0), (if side > 0: 1.0 else: -1.0)]: + [OK] open space is a circle + [OK] wall blocks + [OK] shared endpoint: no leak at the vertex + [OK] shared vertex: both arms required (mutation d1/d2) + [OK] '<' apex: ray through the shared tip must not leak + [OK] every segment endpoint is a polygon vertex (lower and upper end inclusive) + [OK] rays nudged past a corner: area just beyond a wall end is visible + [OK] shared endpoint: closed corner of box has no crack + [OK] collinear walls act as one + [OK] collinear walls with a gap let light through + [OK] T-junction: no leak and correct shadow + [OK] pillar mid-room casts a shadow, sides visible + [OK] closed door blocks, open door passes + [OK] token exactly at wall endpoint + [OK] token at endpoint of free-standing wall sees along it + [OK] long thin corridor + [OK] wall endpoints behind the viewer: fan stays angularly ordered + [OK] radius clips + [OK] square polygon + [OK] tiny polygon inside one cell + [OK] polygon spanning a cell with no vertex in it + [OK] big polygon includes fully covered interior cells + [OK] degenerate input: fewer than 3 vertices + [OK] touching a cell line: inclusive on the max side, not on the bbox minimum side + [OK] concave polygon: a notch cell is not filled + [OK] every token in seed sees itself and is not walled in + [OK] visibilityPolygon and cellsTouched equal the prototype results + [OK] random visibility polygons: identical cell lists + [OK] random simple polygons (star-shaped, concave): identical cell lists + [OK] grid-aligned integer polygons (edges on cell lines): identical cell lists + [OK] prototype scene, all tokens, doors closed and opened + [OK] random wall fields, cell 32 and 25 + [OK] negative control: the oracle notices a missing and an invented cell + [OK] crossing blocked, parallel ok + [OK] grazing an endpoint is blocked + [OK] no leak through shared vertex + [OK] diagonal squeeze through corner vertex of L + [OK] moving along a collinear wall is blocked + [OK] doors + [OK] zero-length move + [OK] near pillar: circle overlapping blocked, clear ok (ported) + [OK] closed door blocks near, open door passes (ported) + [OK] 64px corridor and doorway passable on the centreline (ported) + [OK] corner clipping: path passes the wall end closer than r though both ends are clear + [OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear) + [OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked + [OK] leg of the path inside r of a non-start wall blocks even if start and end are clear + [OK] exactly on a wall: can step off perpendicular, either side, to a clear spot + [OK] exactly on a wall: still refused when it would stay overlapped or run along/through + [OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype + [OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped + [OK] escaping one wall does not excuse another + [OK] escape from a closed door; an open door never needed an escape + [OK] overlapping at a wall end: leave past the end without crossing + [OK] owner check: not yours is mkError, no position + [OK] GM-controlled token (no owner): players get mkError + [OK] step cap = scene default without vision, token vision radius with it + [OK] over-cap, blocked-by-wall, blocked-flag and out-of-bounds nacks are identical + [OK] an accepted move applies and echoes the destination + [OK] player move honours walls (capsule) via moveToken + [OK] GM: ignores walls, step cap and blocked; bounds still apply + [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not + [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets + [OK] blocked token: player moves refused, GM move allowed + [OK] cleared by removing the wall; unrelated removals keep it + [OK] cleared by opening the door; a second open is a no-op + [OK] cleared by the GM; not re-set by itself + [OK] wall update = remove then add + [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear + [FAILED] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [FAILED] push: centre on the door line -> side of the previous position; no history -> left of a->b + [FAILED] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [FAILED] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged + [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees + [OK] KEEP: wall update away from one of two overlapping walls keeps blocked + [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked + [OK] GM drops a token inside a wall -> blocked; a door counts only while closed + [OK] GM manual clear inside a wall: player escapes sideways, cannot cross + [OK] an unrelated wall change elsewhere does not re-block a GM-cleared token + [OK] no escape hatch: a player cannot walk through any wall of a boxed room +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tmoverules' + [OK] P1: probes longer than the cap get one fixed nack regardless of the scene + [OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes + [OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail) + [OK] P4: probing cannot unflag or move a blocked token + [OK] doors beyond the bound: opening or closing them changes no reply + [OK] exactly n walls, deterministic per seed, seeds differ + [OK] doors are every 10th wall, all closed; walls stay inside the world (+- jitter) + [OK] walls are non-degenerate and axis-ish segments of room-edge length +# test exit=1; expected tests failed: 3 + [FAILED] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [FAILED] push: centre on the door line -> side of the previous position; no history -> left of a->b + [FAILED] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged + +m: exit=1 expected_failed=3 ok +## n: door push: no validity check +# diff server/moverules.nim -> mutated copy: +# 206c206 +# < if inBounds(sc, p) and not overlapsAny(sc, tt): return (true, p) +# --- +# > return (true, p) + [OK] open space is a circle + [OK] wall blocks + [OK] shared endpoint: no leak at the vertex + [OK] shared vertex: both arms required (mutation d1/d2) + [OK] '<' apex: ray through the shared tip must not leak + [OK] every segment endpoint is a polygon vertex (lower and upper end inclusive) + [OK] rays nudged past a corner: area just beyond a wall end is visible + [OK] shared endpoint: closed corner of box has no crack + [OK] collinear walls act as one + [OK] collinear walls with a gap let light through + [OK] T-junction: no leak and correct shadow + [OK] pillar mid-room casts a shadow, sides visible + [OK] closed door blocks, open door passes + [OK] token exactly at wall endpoint + [OK] token at endpoint of free-standing wall sees along it + [OK] long thin corridor + [OK] wall endpoints behind the viewer: fan stays angularly ordered + [OK] radius clips + [OK] square polygon + [OK] tiny polygon inside one cell + [OK] polygon spanning a cell with no vertex in it + [OK] big polygon includes fully covered interior cells + [OK] degenerate input: fewer than 3 vertices + [OK] touching a cell line: inclusive on the max side, not on the bbox minimum side + [OK] concave polygon: a notch cell is not filled + [OK] every token in seed sees itself and is not walled in + [OK] visibilityPolygon and cellsTouched equal the prototype results + [OK] random visibility polygons: identical cell lists + [OK] random simple polygons (star-shaped, concave): identical cell lists + [OK] grid-aligned integer polygons (edges on cell lines): identical cell lists + [OK] prototype scene, all tokens, doors closed and opened + [OK] random wall fields, cell 32 and 25 + [OK] negative control: the oracle notices a missing and an invented cell + [OK] crossing blocked, parallel ok + [OK] grazing an endpoint is blocked + [OK] no leak through shared vertex + [OK] diagonal squeeze through corner vertex of L + [OK] moving along a collinear wall is blocked + [OK] doors + [OK] zero-length move + [OK] near pillar: circle overlapping blocked, clear ok (ported) + [OK] closed door blocks near, open door passes (ported) + [OK] 64px corridor and doorway passable on the centreline (ported) + [OK] corner clipping: path passes the wall end closer than r though both ends are clear + [OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear) + [OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked + [OK] leg of the path inside r of a non-start wall blocks even if start and end are clear + [OK] exactly on a wall: can step off perpendicular, either side, to a clear spot + [OK] exactly on a wall: still refused when it would stay overlapped or run along/through + [OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype + [OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped + [OK] escaping one wall does not excuse another + [OK] escape from a closed door; an open door never needed an escape + [OK] overlapping at a wall end: leave past the end without crossing + [OK] owner check: not yours is mkError, no position + [OK] GM-controlled token (no owner): players get mkError + [OK] step cap = scene default without vision, token vision radius with it + [OK] over-cap, blocked-by-wall, blocked-flag and out-of-bounds nacks are identical + [OK] an accepted move applies and echoes the destination + [OK] player move honours walls (capsule) via moveToken + [OK] GM: ignores walls, step cap and blocked; bounds still apply + [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not + [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets + [OK] blocked token: player moves refused, GM move allowed + [OK] cleared by removing the wall; unrelated removals keep it + [OK] cleared by opening the door; a second open is a no-op + [OK] cleared by the GM; not re-set by itself + [OK] wall update = remove then add + [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [OK] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [FAILED] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [FAILED] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged + [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees + [OK] KEEP: wall update away from one of two overlapping walls keeps blocked + [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked + [OK] GM drops a token inside a wall -> blocked; a door counts only while closed + [OK] GM manual clear inside a wall: player escapes sideways, cannot cross + [OK] an unrelated wall change elsewhere does not re-block a GM-cleared token + [OK] no escape hatch: a player cannot walk through any wall of a boxed room +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tmoverules' + [OK] P1: probes longer than the cap get one fixed nack regardless of the scene + [OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes + [OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail) + [OK] P4: probing cannot unflag or move a blocked token + [OK] doors beyond the bound: opening or closing them changes no reply + [OK] exactly n walls, deterministic per seed, seeds differ + [OK] doors are every 10th wall, all closed; walls stay inside the world (+- jitter) + [OK] walls are non-degenerate and axis-ish segments of room-edge length +# test exit=1; expected tests failed: 2 + [FAILED] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [FAILED] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + +n: exit=1 expected_failed=2 ok +## o: door push: previous position ignored on the line +# diff server/moverules.nim -> mutated copy: +# 197c197 +# < side = if t.hasPrev: dot(t.prev - w.a, n) else: 0.0 +# --- +# > side = 0.0 + [OK] open space is a circle + [OK] wall blocks + [OK] shared endpoint: no leak at the vertex + [OK] shared vertex: both arms required (mutation d1/d2) + [OK] '<' apex: ray through the shared tip must not leak + [OK] every segment endpoint is a polygon vertex (lower and upper end inclusive) + [OK] rays nudged past a corner: area just beyond a wall end is visible + [OK] shared endpoint: closed corner of box has no crack + [OK] collinear walls act as one + [OK] collinear walls with a gap let light through + [OK] T-junction: no leak and correct shadow + [OK] pillar mid-room casts a shadow, sides visible + [OK] closed door blocks, open door passes + [OK] token exactly at wall endpoint + [OK] token at endpoint of free-standing wall sees along it + [OK] long thin corridor + [OK] wall endpoints behind the viewer: fan stays angularly ordered + [OK] radius clips + [OK] square polygon + [OK] tiny polygon inside one cell + [OK] polygon spanning a cell with no vertex in it + [OK] big polygon includes fully covered interior cells + [OK] degenerate input: fewer than 3 vertices + [OK] touching a cell line: inclusive on the max side, not on the bbox minimum side + [OK] concave polygon: a notch cell is not filled + [OK] every token in seed sees itself and is not walled in + [OK] visibilityPolygon and cellsTouched equal the prototype results + [OK] random visibility polygons: identical cell lists + [OK] random simple polygons (star-shaped, concave): identical cell lists + [OK] grid-aligned integer polygons (edges on cell lines): identical cell lists + [OK] prototype scene, all tokens, doors closed and opened + [OK] random wall fields, cell 32 and 25 + [OK] negative control: the oracle notices a missing and an invented cell + [OK] crossing blocked, parallel ok + [OK] grazing an endpoint is blocked + [OK] no leak through shared vertex + [OK] diagonal squeeze through corner vertex of L + [OK] moving along a collinear wall is blocked + [OK] doors + [OK] zero-length move + [OK] near pillar: circle overlapping blocked, clear ok (ported) + [OK] closed door blocks near, open door passes (ported) + [OK] 64px corridor and doorway passable on the centreline (ported) + [OK] corner clipping: path passes the wall end closer than r though both ends are clear + [OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear) + [OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked + [OK] leg of the path inside r of a non-start wall blocks even if start and end are clear + [OK] exactly on a wall: can step off perpendicular, either side, to a clear spot + [OK] exactly on a wall: still refused when it would stay overlapped or run along/through + [OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype + [OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped + [OK] escaping one wall does not excuse another + [OK] escape from a closed door; an open door never needed an escape + [OK] overlapping at a wall end: leave past the end without crossing + [OK] owner check: not yours is mkError, no position + [OK] GM-controlled token (no owner): players get mkError + [OK] step cap = scene default without vision, token vision radius with it + [OK] over-cap, blocked-by-wall, blocked-flag and out-of-bounds nacks are identical + [OK] an accepted move applies and echoes the destination + [OK] player move honours walls (capsule) via moveToken + [OK] GM: ignores walls, step cap and blocked; bounds still apply + [OK] wall added within r of the circle (centre not on it) sets blocked; exactly r does not + [OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does + [OK] open door added or opened never sets; closing a door on a token pushes it, never sets + [OK] blocked token: player moves refused, GM move allowed + [OK] cleared by removing the wall; unrelated removals keep it + [OK] cleared by opening the door; a second open is a no-op + [OK] cleared by the GM; not re-set by itself + [OK] wall update = remove then add + [OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear + [OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too + [FAILED] push: centre on the door line -> side of the previous position; no history -> left of a->b + [OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door + [OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side + [OK] push: both sides invalid -> blocked in place; door open -> free; GM can still move it + [OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody + [OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged + [OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees + [OK] KEEP: wall update away from one of two overlapping walls keeps blocked + [OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked + [OK] GM drops a token inside a wall -> blocked; a door counts only while closed + [OK] GM manual clear inside a wall: player escapes sideways, cannot cross + [OK] an unrelated wall change elsewhere does not re-block a GM-cleared token + [OK] no escape hatch: a player cannot walk through any wall of a boxed room +Error: execution of an external program failed: '/tmp/tmp.V0I5xpbA3Y/w/tests/tmoverules' + [OK] P1: probes longer than the cap get one fixed nack regardless of the scene + [OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes + [OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail) + [OK] P4: probing cannot unflag or move a blocked token + [OK] doors beyond the bound: opening or closing them changes no reply + [OK] exactly n walls, deterministic per seed, seeds differ + [OK] doors are every 10th wall, all closed; walls stay inside the world (+- jitter) + [OK] walls are non-degenerate and axis-ish segments of room-edge length +# test exit=1; expected tests failed: 1 + [FAILED] push: centre on the door line -> side of the previous position; no history -> left of a->b + +o: exit=1 expected_failed=1 ok exit=0