-
Notifications
You must be signed in to change notification settings - Fork 0
Development Guide
Brandt Homan edited this page May 8, 2026
·
2 revisions
This page is for contributors who need to change rules, UI, multiplayer behavior, or deployment tooling without fighting the architecture.
- Keep the engine headless. Do not add Pygame dependencies to
engine/. - Prefer typed actions and state transitions over ad hoc UI-side rule logic.
- Let the UI read game state and submit actions instead of mutating rules directly.
- Add or update regression coverage when behavior changes.
- Keep documentation current enough that the next teammate can follow the change.
Typical files:
engine/game_state.pytests/test_rules.py-
ui/board_renderer.pyorui/game_screen.pyif the visuals or prompts also change
Typical workflow:
- Change the rule behavior in
GameState. - Add or update tests for the new state transition.
- Update the UI only if the new rule needs a new prompt, icon, or visual state.
Typical files:
engine/actions.pyengine/game_state.pyui/game_screen.pytests/test_rules.py
Typical workflow:
- Add or update the request type definition.
- Implement the request resolution in the engine.
- Add the player-facing request flow in the UI.
- Cover the request with regression tests.
Typical files:
ui/screen_manager.pyui/window.py-
ui/game_screen.pywhen the screen is match-specific
Typical workflow:
- Add the screen state and transitions.
- Make sure the new screen hides or shows the right controls.
- Add smoke checks if the layout or flow is easy to regress.
Typical files:
engine/ai.pybalance_testing.pyARCHITECTURE_FOR_AI.py
Typical workflow:
- Improve the agent logic or evaluation heuristic.
- Run the regression suite.
- Run a balance sample and compare the resulting win and damage patterns.
Typical files:
multiplayer/local_room.pymultiplayer/browser_room.pymultiplayer/serialization.pyroom_server.py
Be careful to keep:
- snapshot formats compatible
- browser and Python client behavior aligned
- leave, rematch, and reconnect flows tested
-
README.mdfor the current user-facing project overview -
Changes.mdfor recent implementation history -
tests/test_rules.pyfor current expected behavior -
PROJECT_STATUS.mdandARCHITECTURE_FOR_AI.pyfor design intent
After meaningful work:
- Update the relevant docs when behavior changed.
- Add a short entry to
Changes.mdif the work is noteworthy. - Rebuild the web package if the browser deliverable changed.
If a change feels like "just a UI tweak" but it affects legality, turn order, or victory state, move that logic into the engine instead.