Skip to content

Extract shared board rendering service #57

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

Extract shared board rendering service #57

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

Comments

@francinv
Copy link
Member

francinv commented Apr 6, 2026

GameBoardRenderer and SetupBoardRenderer duplicate tile geometry, grid drawing, and piece rendering logic. BoardCoordinateMapper exists only in setup — game reimplements the same row-flip math internally.

What to do:

  • Extract common board rendering (grid, tiles, pieces) into a shared base class or utility
  • Move BoardCoordinateMapper out of screens/setup/ into a shared location (e.g. utils/)
  • Both renderers should extend/use the shared component

Key files:

  • GameBoardRenderer.java:55-99, 101-169
  • SetupBoardRenderer.java:42-60, 78-139
  • BoardCoordinateMapper.java:11-42 (setup only)
  • GameBoardRenderer.java:64-72 (reimplements coordinate mapping)
@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