refactor: simplify scoring to remove efficiency metrics

- Remove efficiency calculation (not applicable to sudoku gameplay)
- Simplify to time + keystrokes only scoring
- New formula: score = min(1000, (1000 - time_penalty - keystroke_penalty) * difficulty_multiplier)
  - time_penalty = seconds / 10
  - keystroke_penalty = totalKeys / 2
  - difficulty multipliers: easy 1.0x, medium 1.5x, hard 2.0x
- Update difficulty levels to realistic values:
  - Easy: 25 cells removed (was 5)
  - Medium: 40 cells removed (was 50)
  - Hard: 50 cells removed (was 60)
- Update scoreboard to show only Time, Keystrokes, and Final Score (X / 1000)
- Remove editKeystrokes, optimalKeystrokes, efficiency from ScoreManager type
This commit is contained in:
2025-10-22 21:03:56 +01:00
parent 8db4455dc5
commit cfdf8100fb
6 changed files with 145 additions and 47 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ export function useGame(options: GameOptions = {}, platformHook?: unknown): Game
const cursorPosition = cursor.position();
const cursorMode = cursor.mode();
const scoreManager = useScore({ board, gameStatusManager, keyLog, cursorMode });
const scoreManager = useScore({ board, gameStatusManager, keyLog, cursorMode, difficulty });
useCursorRender(containerRef, cursorPosition, cursorMode, gameStatus, boardRendered);