Skip to content

BBQ Farmer: run rounds against injectable BBQGameActions - #1632

Closed
dayfine wants to merge 2 commits into
PokemonAutomation:mainfrom
dayfine:bbq/save-milestone-tracker
Closed

dayfine wants to merge 2 commits into
PokemonAutomation:mainfrom
dayfine:bbq/save-milestone-tracker

Conversation

@dayfine

@dayfine dayfine commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Moves the BBQ Farmer's round loop out of program() into run_bbq_rounds(), which talks to the game through a small BBQGameActions interface. No behavior change. This lets the round logic (what counts, when to stop, when to save) be tested without a Switch: PokemonSV::BBQFarmerRounds runs scenarios against a simulated quest panel. The loop body is unchanged apart from swapping console calls for game. calls.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

@dayfine
dayfine force-pushed the bbq/save-milestone-tracker branch from 2344b3f to 64fe041 Compare October 21, 2026 04:10
@dayfine dayfine changed the title BBQ Farmer: move the save decision into BBQSaveMilestones BBQ Farmer: run rounds through a testable BBQFarmerSteps interface Oct 21, 2026
@dayfine
dayfine force-pushed the bbq/save-milestone-tracker branch 3 times, most recently from 0c2de62 to 9fad4d8 Compare October 21, 2026 04:43
@dayfine dayfine changed the title BBQ Farmer: run rounds through a testable BBQFarmerSteps interface BBQ Farmer: run rounds against injectable BBQGameActions Oct 21, 2026
@dayfine
dayfine force-pushed the bbq/save-milestone-tracker branch from 9fad4d8 to d73d9d7 Compare October 21, 2026 04:55
BBQSoloFarmer::program() runs its quest rounds inline against the
console, so the round logic (which quests count, when to stop, when to
save) can only be exercised by running the farmer on a Switch.

Move the round loop into run_bbq_rounds(), which takes the game actions
it depends on as a BBQGameActions interface: read the quests, process
them, do a quest, report a completed quest, and end the round (saving
if due). BBQSoloFarmer implements these with the calls they replace, in
the same order; the date fix, save/reset, stats and notification move
together into end_round(). Startup, flying to the plaza and
end-of-program handling stay in program(). The commented-out
single-quest debug block declares its own egg counter now that the loop
locals have moved.

process_quest_list() only reads its quest list and egg count, so take
them as const& and by value.

Add PokemonSV::BBQFarmerRounds, a table of scenarios run against a
simulated singleplayer quest panel: 3 blue quests, completed quests are
replaced, impossible quests are skipped, and a panel with nothing doable
is rerolled. Each scenario checks the number of completed quests and the
exact action sequence: finishing the round that reaches the goal, a
quest already gone, a failed quest, a panel with nothing doable, saving
at exact multiples, and stopping when out of eggs. No behavior
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine
dayfine force-pushed the bbq/save-milestone-tracker branch from d73d9d7 to ea359ba Compare October 21, 2026 05:04
@dayfine
dayfine marked this pull request as ready for review October 21, 2026 05:14
@dayfine

dayfine commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

@jw098 PTAL - also a refactor that sets up some testing and expectations, to make later changes easier

Windows Clang (clang-cl /W4 /WX) errors on designated initializers that
leave out a field with no default member initializer
(-Wmissing-designated-field-initializers); tests built on these scenarios
omit these fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine

dayfine commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Closing for now to keep at most two PRs open, per CONTRIBUTIONS.md. I'll resend this later.

@dayfine dayfine closed this Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant