Skip to content

feat: Period labels, faceoff wins, and penalty queue#3

Merged
JRemitz merged 1 commit intomainfrom
feat/period-labels-faceoffs-penalty-queue
Mar 26, 2026
Merged

feat: Period labels, faceoff wins, and penalty queue#3
JRemitz merged 1 commit intomainfrom
feat/period-labels-faceoffs-penalty-queue

Conversation

@JRemitz
Copy link
Copy Markdown
Contributor

@JRemitz JRemitz commented Mar 26, 2026

Summary

  • Configurable period labels — sport-specific defaults (e.g. hockey: 1, 2, 3, OT, OT2, OT3, OT4) with external file override via period_labels.txt. "Edit..." button in Game Settings opens the file in the user's default text editor. File watcher applies changes live.
  • Faceoff wins counter — home/away tracking for hockey and lacrosse, displayed below SOG in dock UI. Includes +/- buttons, 4 OBS hotkeys, home_faceoffs.txt/away_faceoffs.txt output files, JSON persistence, and tooltips on all stat rows.
  • Penalty queue — only 2 penalties per team tick simultaneously (SCOREBOARD_MAX_RUNNING_PENALTIES), matching hockey rules. Additional penalties queue and auto-start when earlier ones expire. Dock UI shows queued penalties with "(queued)" suffix. Text file output shows only running penalties.
  • Fix: Start/Stop button state — button now resets to green "Start" when clock auto-stops at 0:00 (previously stayed red "Stop").
  • Fix: Penalty-clock coupling — penalty timers freeze when period clock reaches 0:00 (previously kept ticking after auto-stop).

Test plan

  • make dev — all 7 test binaries pass
  • make coverage — 100% line coverage on scoreboard-core.c
  • make install && make run — verify in OBS:
    • Hockey: FO row visible below SOG, faceoff +/- works, hotkeys work
    • Basketball: FO row hidden
    • Add 3 penalties → only 2 tick, 3rd shows "(queued)" in dock
    • Let one expire → 3rd auto-starts
    • Clock reaches 0:00 → button resets to green, penalties freeze
    • Game Settings → "Edit..." opens period_labels.txt
    • Edit labels externally → dock updates live
  • Reeln plugin tests: uv run pytest tests/ — 81 tests pass

🤖 Generated with Claude Code

…queue

Add three features and two bug fixes for the next release:

- Configurable period labels: sport-specific defaults (e.g. hockey 1,2,3,OT,OT2,OT3,OT4)
  with external file override via period_labels.txt and Edit button in Game Settings
- Faceoff wins counter: home/away tracking for hockey/lacrosse with dock UI, hotkeys,
  text file output, and JSON persistence
- Penalty queue: only 2 penalties per team tick simultaneously, extras auto-start on expiry
- Fix: Start/Stop button resets to green when clock auto-stops at 0:00
- Fix: Penalty timers freeze when period clock reaches 0:00

100% line coverage on scoreboard-core.c maintained with comprehensive new tests.

Co-Authored-By: Claude <noreply@anthropic.com>
@JRemitz JRemitz merged commit 8f6fcbe into main Mar 26, 2026
7 checks passed
@JRemitz JRemitz deleted the feat/period-labels-faceoffs-penalty-queue branch March 26, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant