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:
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user