Skip to content

Randomize game seed on every new game start#420

Merged
SorraTheOrc merged 2 commits intomainfrom
copilot/randomize-game-seed
Mar 11, 2026
Merged

Randomize game seed on every new game start#420
SorraTheOrc merged 2 commits intomainfrom
copilot/randomize-game-seed

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 10, 2026

MainStreetScene was passing a hardcoded seed: 'main-street-demo' to setupMainStreetGame(), causing every game — including "play again" restarts via scene.restart() — to produce identical card sequences.

Change

  • MainStreetScene.ts: Removed the hardcoded seed so setupMainStreetGame() falls through to generateSeedString(), which produces a fresh random 6-character alphanumeric seed on each call.
// Before
this.state = setupMainStreetGame({
  seed: 'main-street-demo',
  difficulty: this.selectedDifficulty,
});

// After
this.state = setupMainStreetGame({
  difficulty: this.selectedDifficulty,
});
Original prompt

This section details on the original issue you should resolve

<issue_title>Randomize game seed</issue_title>
<issue_description>

It feels like the game seed is fixed, that is if I play a game then opt to lay a new game the cards come out the same. We need to ensure the game is randomized at start.</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: SorraTheOrc <250240+SorraTheOrc@users.noreply.github.com>
Copilot AI changed the title [WIP] Randomize game seed at start Randomize game seed on every new game start Mar 10, 2026
@SorraTheOrc SorraTheOrc marked this pull request as ready for review March 11, 2026 01:06
@SorraTheOrc SorraTheOrc merged commit 168f428 into main Mar 11, 2026
@SorraTheOrc SorraTheOrc deleted the copilot/randomize-game-seed branch March 11, 2026 01:06
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.

Randomize game seed

2 participants