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
+3 -3
View File
@@ -1,9 +1,9 @@
export type Difficulty = 'easy' | 'medium' | 'hard';
const CELLS_TO_REMOVE = {
easy: 5,
medium: 50,
hard: 60,
easy: 25,
medium: 40,
hard: 50,
} as const;
export class SudokuGenerator {