Skip to content

BBQ Farmer: run rounds against injectable BBQGameActions - #37

Closed
dayfine wants to merge 8 commits into
bbq/tests-filefrom
bbq/save-milestone-tracker
Closed

dayfine wants to merge 8 commits into
bbq/tests-filefrom
bbq/save-milestone-tracker

Conversation

@dayfine

@dayfine dayfine commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Stage 1 ("never stuck"), PR 1 of 9. Based on bbq/tests-file (#51), so the diff shows only this change. Parents: #51 → main.

Part of PokemonAutomation/ComputerControl#263.

Moved from upstream PokemonAutomation#1632, to resend later (at most two open upstream).

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.
Tested on the Switch with the rest of stage 1 in runs S1b and S1c (STAGE_RUNS.md): 15 quests, no stretch over 11 min without a completion, BP check OK. No behavior change here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

PokemonSV_Tests.cpp registers every SV test, and each BBQ change adds
its controller tests there, so parallel BBQ changes all conflict in it.
Move the Tera encounter tests unchanged into
Programs/Farming/PokemonSV_BBQTests.cpp, registered through one
add_tests_BBQ() call, following the add_tests_<Module>() pattern the
detectors use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
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 64c2af9 to 272e7fe Compare October 28, 2026 08:14
@dayfine
dayfine force-pushed the bbq/tests-file branch 2 times, most recently from bf82b48 to daa1de3 Compare October 28, 2026 20:37
@dayfine dayfine added farmer Farming programs game:sv Scarlet/Violet refactor No behavior change labels Nov 1, 2026
@dayfine

dayfine commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Superseded by consolidated Tree 1 PR #272.

@dayfine dayfine closed this Nov 9, 2026
@dayfine
dayfine deleted the bbq/save-milestone-tracker branch November 13, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

farmer Farming programs game:sv Scarlet/Violet refactor No behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant