feat(phase2.1): track total keystrokes via keyLog length

- Expose keyLog.length as totalKeystrokes in ScoreManager
- Pass keyLog from useKeyBindings to useScore hook
- All game inputs (hjkl and platform keys) automatically counted
- Keystroke counter resets when keyLog is cleared (game restart)
This commit is contained in:
2025-10-30 23:55:15 +00:00
parent b59da4881d
commit 2a7162abf3
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ export function useGame(optionsOrCols: GameOptions | number, rows?: number, plat
},
});
const scoreManager = useScore({ gameStatus });
const scoreManager = useScore({ gameStatus, keyLog: keyBindings.keyLog });
// Wrap renderBoard to match Unified API signature
const renderBoardWrapped = () => {