Add failed-Exam loss switch; keep -3 and accept the length (6.11, D50)

RulesConfig.exam_failure_loss (bots aware) with the sim axis --exam-loss.
Losing 1 or 0 stripes saves 3-5 minutes but weakens comebacks, so the
rules keep -3. Default games are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-27 17:51:13 +02:00
parent 542ac1b15f
commit 52d8af620b
11 changed files with 116 additions and 17 deletions
+16
View File
@@ -677,6 +677,22 @@ def test_failing_the_exam_costs_a_belt_and_the_defender_gains_nothing() -> None:
assert game.players[2].track == 12
@pytest.mark.parametrize(("loss", "track"), [(0, 15), (1, 14)])
def test_failed_exam_loss_is_configurable(loss: int, track: int) -> None:
config = RulesConfig(exam_failure_loss=loss)
game, agents = dojo_game([1, 1, 1, 6], config=config, p1=9, p2=12)
turn(game, agents, 0, Pos(6, 7))
assert game.players[0].track == track
assert game.players[0].position == START_0
def test_failed_exam_loss_cannot_be_negative() -> None:
with pytest.raises(ValueError, match="exam_failure_loss"):
RulesConfig(exam_failure_loss=-1)
def test_uke_in_the_exam_returns_to_the_entrance() -> None:
game, agents = dojo_game([1, 1, 1, 6], p1=9, p2=12)
game.players[0].tecnica = Card.UKE