feat: enable seamless game mode switching during active gameplay

- Remove quitGame() call from changeGameMode to allow continuous play
- Game now transitions between modes without stopping
- Add test case in example App to auto-switch from letters to words at score 10
This commit is contained in:
2025-11-04 00:26:17 +00:00
parent ab3a1e13cd
commit 9037af2e31
2 changed files with 23 additions and 20 deletions
+1 -4
View File
@@ -42,10 +42,7 @@ export function useGame(
const changeGameMode = (mode: GameMode) => {
setGameModeState(mode);
// Only quit if the game is actively running
if (gameStatusManager.gameStatus === 'started') {
gameStatusManager.quitGame();
}
// Don't quit - just switch modes and let game continue
};
// Set the game loop callback