feat: add timeLimit option and time-based game-over logic

- Add timeLimit to GameOptions (default 600 seconds)
- Game-over triggers when time limit exceeded
- Remove all efficiency-based game-over logic
- Pass timeLimit through to useScore
- Check time limit during started and has-key states
This commit is contained in:
2025-10-22 22:07:59 +01:00
parent 7ccf7cdd55
commit 7800acaf56
3 changed files with 16 additions and 4 deletions
+1
View File
@@ -11,6 +11,7 @@ export * from './useScore/types';
export type GameOptions = {
rows: number;
cols: number;
timeLimit?: number;
};
export type KeyLogEntry = { key: string; timestamp: number };