Skip to content

Refactor board and planet queries - #5384

Draft
heisenbugged wants to merge 1 commit into
masterfrom
codex/board-query-refactors
Draft

Refactor board and planet queries#5384
heisenbugged wants to merge 1 commit into
masterfrom
codex/board-query-refactors

Conversation

@heisenbugged

Copy link
Copy Markdown
Collaborator

Summary

  • centralize planet lookup, ownership, board traversal, and unit queries
  • replace repeated planet-selection loops with reusable controlled/usable planet services
  • consolidate agenda exhaustion, Smothering Presence, unit movement, and repeated faction workflows
  • remove obsolete duplicate helpers and migrate call sites to canonical APIs

Why

Common board and planet operations were repeatedly implemented through nested tile, holder, planet, and player loops. This made rules harder to read and encouraged duplicate helper APIs. The new domain-level queries keep rule predicates visible while removing storage-hierarchy boilerplate.

Scope

Combat and combat-replay implementation files and tests are intentionally excluded from this PR. Deprecated compatibility delegates remain temporarily so unchanged combat code continues to compile against the new core APIs.

Validation

  • mvn test
  • git diff --check
  • staged-only snapshot tested with combat/replay changes excluded

@github-actions

Copy link
Copy Markdown

🔬 Test Results

✅ JSON Validation

No JSON files changed.


❌ Build Failed

Maven build failed with no test-failure details captured — see the Actions run for the full log.

@Fingon00

Copy link
Copy Markdown
Contributor

I like the naming of getRepresentation more than toString, given how sometimes we want to get representation without a ping or fogged/unfogged.

@Fingon00

Copy link
Copy Markdown
Contributor

This change is also hard to review because so many of the changes are just changing getRepresentation into toString. I dont have time to sift through all of those to find the real stuff.

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.

2 participants