Skip to content

Arimaa: pass the cell into the OCCUPIED validation message - #479

Merged
Perlkonig merged 1 commit into
AbstractPlay:developfrom
samtcifihi:arimaa-occupied-message-2026-09-19
Sep 19, 2026
Merged

Perlkonig merged 1 commit into
AbstractPlay:developfrom
samtcifihi:arimaa-occupied-message-2026-09-19

Conversation

@samtcifihi

Copy link
Copy Markdown
Contributor

tldr: Making an error message not have an untranslated {{where}}.

Otherwise the Arimaa fix looks good. The move list looking to not list the rabbits is purely visual; I tested with a game against an alt account and it corrects itself to the full move that the backend has as soon as you submit the move.

Arimaa: pass the cell into the OCCUPIED validation message

Both Arimaa call sites for apgames:validation._general.OCCUPIED omitted the interpolation parameter, so the message rendered with the placeholder intact:

The cell {{where}} is already occupied.

141 of the 148 call sites across the games already pass where, and the string has always had the placeholder, so this is just an oversight. Now reads "The cell e2 is already occupied."

Two call sites:

  • Setup placement (validateMove, placement branch). Reachable by typing a cell that's already taken, or naming one cell twice in a single setup move. Arimaa Input QoL #477 routed the duplicate-cell case here, which is how I noticed.
  • Movement (validateMove, movement branch, to is empty). Same omission; not touched by Arimaa Input QoL #477, fixed here for consistency.

Three existing assertions in Can't place two pieces on one cell updated to pass where.

The two call sites in Arimaa omitted the interpolation parameter, so the
message rendered literally as "The cell {{where}} is already occupied."
141 of the 148 call sites across the games already pass it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QDibMmzgf18ky9fiCRW5cL
@Perlkonig
Perlkonig merged commit c79f259 into AbstractPlay:develop Sep 19, 2026
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