Skip to content

Add Card Rat tutorial flow using shared tutorial framework - #129

Draft
acrosman with Copilot wants to merge 8 commits into
mainfrom
copilot/copilotcreate-general-framework-for-game-tutorials
Draft

Add Card Rat tutorial flow using shared tutorial framework#129
acrosman with Copilot wants to merge 8 commits into
mainfrom
copilot/copilotcreate-general-framework-for-game-tutorials

Conversation

Copilot AI commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Card Rat now uses the shared tutorial overlay framework so first-time players get a guided walkthrough, while returning players can start immediately. The instructions screen also adds an explicit replay path for players who want to re-run the tutorial.

  • Tutorial integration in game lifecycle (app/games/card-rat/index.js)

    • Added Card Rat-specific TUTORIAL_STEPS.
    • Routed Start Game through showTutorialIfNeeded(...) so unseen players get the overlay before gameplay starts.
    • Added replay handler using showTutorial(...) for explicit tutorial re-runs.
    • Added guard to avoid opening duplicate overlays.
  • Instructions UI updates (app/games/card-rat/interface.html, style.css)

    • Added a Replay Tutorial button next to Start Game.
    • Added a small shared action-row layout for instruction actions.
  • Focused plugin tests (app/games/card-rat/tests/index.test.js)

    • Added assertions that Start invokes showTutorialIfNeeded(...).
    • Added assertions that Replay Tutorial invokes showTutorial(...).
// start path: show only when unseen, then begin game
await showTutorialIfNeeded(GAME_ID, TUTORIAL_STEPS, container, start);

// replay path: always show tutorial, then begin game
showTutorial(GAME_ID, TUTORIAL_STEPS, container, start);

Copilot AI and others added 5 commits August 8, 2026 00:57
Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
…Needed

Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Copilot AI linked an issue Aug 8, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add tutorial for Card Rat game Add Card Rat tutorial flow using shared tutorial framework Aug 8, 2026
Copilot AI requested a review from acrosman August 8, 2026 01:28
Copilot AI and others added 2 commits August 7, 2026 21:33
…als' of github.com:acrosman/BrainSpeedExercises into copilot/copilotcreate-general-framework-for-game-tutorials

* 'copilot/copilotcreate-general-framework-for-game-tutorials' of github.com:acrosman/BrainSpeedExercises:
  Initial plan

@acrosman acrosman left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've rebased this branch to have the correct base so you have the framework you need to complete the work. It appears no code was actually altered in the initial attempt. Please try again using the framework now included in this branch.

@acrosman

acrosman commented Aug 8, 2026

Copy link
Copy Markdown
Owner

@copilot create a tutorial for the Card Rat game. Update this PR to merge into copilot/create-general-framework-for-game-tutorials instead of main.

Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>

Copilot AI commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot create a tutorial for the Card Rat game. Update this PR to merge into copilot/create-general-framework-for-game-tutorials instead of main.

Implemented in commit 0b4d0c2: Card Rat now uses the shared tutorial flow (showTutorialIfNeeded on start), adds a Replay Tutorial action (showTutorial), includes duplicate-overlay guards, and updates UI/tests accordingly. I can’t retarget the PR base branch from here; please switch the base to copilot/create-general-framework-for-game-tutorials.

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.

Create tutorial for Card Rat

2 participants