Skip to content

add scramble, remove restart, & add updateTargetCircle to player class - #35

Merged
BrettKulp merged 1 commit into
mainfrom
feature/scramble
Aug 13, 2026
Merged

BrettKulp merged 1 commit into
mainfrom
feature/scramble

Conversation

@BrettKulp

@BrettKulp BrettKulp commented Aug 13, 2026 •

Copy link
Copy Markdown
Owner

Adds

  • QB Scramble option — a Scramble button appears on Pass plays so the QB can break the drop-back and run. Hidden on Run plays and disabled once the QB scrambles or the ball leaves his hands (launched pass, completed throw, or pick), so it only exists while the QB actually has the ball.
  • Player.updateTargetCircle() — receiver target-circle show/hide logic moved out of BaseGameScene into a shared method driven by one decision (Pass play, not paused, receiver eligible, on the possessing team, QB not scrambling). It runs every frame including while paused, so circles clear the instant the play type switches, the play pauses, or the QB scrambles — instead of lingering until the next play.
  • getOffensivePlayers() / getDefensivePlayers() helpers in helpers.js to consolidate the possession-based team lookups that were duplicated across managers.

Fixes

  • Pausing a play and hitting Start no longer clears an active QB scramble (startPlay() used to force scramble = false). The flag now resets only on nextPlay(), and the Scramble button re-enables the moment the play is live.
  • Scramble button is no longer enabled before the snap.
  • PassManager's ball-carrier lookup is scoped to the offensive team only.

Removes

  • The in-game Restart button and BaseGameScene.restart() — starting a fresh game is now done via the menu.

Refactors

  • FormationManager and PlayStateManager now use the shared target-circle method and the new team helpers instead of duplicating inline show/hide logic.

@BrettKulp
BrettKulp merged commit 4e00e89 into main Aug 13, 2026
1 check passed
@BrettKulp
BrettKulp deleted the feature/scramble branch August 23, 2026 02:18
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