fix(ludic.fishing): fact records pooled (the ludic.wildlife idiom) - a record made per cast, bite and crossing was never given back
tests: fifty fish, their facts drained each time, make 5 records. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
968030535e
commit
36358e7a43
4 changed files with 41 additions and 2 deletions
|
|
@ -254,4 +254,20 @@ program FishingTest {
|
|||
expect(fishing_legend_caught(fishing_st))
|
||||
expect(not fishing_active(fishing_st))
|
||||
}
|
||||
|
||||
test "fifty fish, their facts drained each time, reuse a handful of records" (fishing_st: mut FishingState, fishing_test_st: mut FishingTestState) {
|
||||
fresh(fishing_st, fishing_test_st)
|
||||
for k in 0 .. 50 {
|
||||
fishing_cast(fishing_st, 20.0, 0.0)
|
||||
facts(fishing_st)
|
||||
hook(fishing_st)
|
||||
facts(fishing_st)
|
||||
play(fishing_st, 12)
|
||||
facts(fishing_st)
|
||||
fishing_stop(fishing_st)
|
||||
facts(fishing_st)
|
||||
}
|
||||
print(`fishing: 50 fish, {fishing_fact_records(fishing_st)} fact records made`)
|
||||
expect(fishing_fact_records(fishing_st) < 30)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue