mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 16:14:12 +01:00
The 114-line private moves() method was most of the file: it enumerates every legal step from a position -- straights, badge formations, n-of-a-kind, lone 1s and 5s, and the two joker rules -- while Scorer just maximises over it and caches the answers. Extracted it to scoringMoves.ts (203) as a free function over ScoringConfig, taking combinationValue with it (its only caller, and the home of the Emperor/Tyche triple-only rule) plus the tripleBase/ofAKindValue helpers. scoring.ts (172) keeps Scorer, its two caches and its two recursions. moves() was private, so no consumer saw the seam; only scoring.test.ts moved, for the two value helpers, import path only. Coverage totals are unchanged at 863/375/181/810 -- the generator's branches are all still exercised. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY |
||
|---|---|---|
| .. | ||
| components | ||
| core | ||
| data | ||
| hooks | ||
| lib | ||
| test | ||
| worker | ||
| App.tsx | ||
| AppLinks.test.tsx | ||
| AppRecovery.test.tsx | ||
| AppShell.test.tsx | ||
| AppStorage.test.tsx | ||
| index.css | ||
| main.tsx | ||