Fixes the "slot is already filled" simulation error when First Four games have already been played and their winners advanced to the Round of 64. Changes: - Fix FF→R64 validation to allow a filled R64 slot when the corresponding First Four match is already complete (the original bug) - Fix isComplete guard for E8/FF/Championship: derive loser from stored participant IDs when loserId is null rather than re-simulating a real game - Add round count validation for all rounds (R32 16, S16 8, E8 4, FF 2, Champ 1) to catch malformed brackets before the hot sim loop instead of producing silent garbage output - Add participant1Id null check in the First Four path (mirrors the no-FF path) - Add console.warn when participant IDs are missing from DB (fall-back to average strength instead of crashing) - Import NCAA_68.regions from bracket-templates.ts instead of duplicating the hardcoded fallback in each simulator - Fix duplicate step-9 comment number in ncaam-simulator.ts Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| auto-racing-simulator.ts | ||
| bracket-simulator.ts | ||
| golf-simulator.ts | ||
| nba-simulator.ts | ||
| ncaam-simulator.ts | ||
| ncaaw-simulator.ts | ||
| nhl-simulator.ts | ||
| registry.ts | ||
| types.ts | ||
| ucl-simulator.ts | ||