Skip to content

Decompose GameScreen to match other screens' modularity #56

Open
francinv opened this issue Apr 6, 2026 · 0 comments
Open

Decompose GameScreen to match other screens' modularity #56

francinv opened this issue Apr 6, 2026 · 0 comments
Assignees

Comments

@francinv
Copy link
Member

francinv commented Apr 6, 2026

GameScreen is 448 lines with 5 files. SetupScreen is 488 lines with 11 files. The split-module tactic was applied unevenly.

GameScreen still owns:

  • Top-bar UI layout
  • Tap-selection state machine
  • Move execution + turn logic
  • Promotion flow
  • Heartbeat scheduling
  • Network callback handling

What to do:

  • Extract UI construction into a dedicated overlay/UI class
  • Extract tap-selection + move execution into a game input handler (like SetupBoardInputHandler)
  • Extract promotion flow into its own class
  • GameScreen should coordinate, not implement

Ref: SetupScreen's decomposition (renderer, input handler, flow controller, widgets, codec, mapper) is the pattern to follow.

@francinv francinv self-assigned this Apr 6, 2026
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant