You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a piece registry that maps type name → class, cost, texture, codec
PieceFactory, SetupPaletteWidget, SetupBoardCodec, and GameOverlayManager should read from the registry instead of maintaining their own hardcoded lists
Adding a new piece type should require: one new class + one registry entry + sprite assets
Ref: Architecture doc claims M2 (add piece in <5h with no side effects).
The text was updated successfully, but these errors were encountered:
Piece types are hardcoded via switch/case and arrays in multiple files. Adding a new piece requires touching 7+ files with 16 side-effect touchpoints.
Hardcoded locations:
PieceFactory.java:26-57— three separate switch blocksSetupPaletteWidget.java:25-31—PIECE_NAMES/PIECE_COSTSarraysSetupBoardCodec.java:20-25, 52-70— numeric codes + instanceof chainGameOverlayManager.java:171-176— hardcoded promotion namesWhat to do:
PieceFactory,SetupPaletteWidget,SetupBoardCodec, andGameOverlayManagershould read from the registry instead of maintaining their own hardcoded listsRef: Architecture doc claims M2 (add piece in <5h with no side effects).
The text was updated successfully, but these errors were encountered: