Skip to content

More fixes - #2

Merged
Perlkonig merged 4 commits into
AbstractPlay:mainfrom
ypaul21:updates
Sep 7, 2026
Merged

Perlkonig merged 4 commits into
AbstractPlay:mainfrom
ypaul21:updates

Conversation

@ypaul21

@ypaul21 ypaul21 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

I went back to the actual XBoard Betza spec, and it turns out I got something wrong last time, plus there were some older oddities I hadn't noticed.

The one from #1 is a. I had it as the series rider prefix (so nightrider was aN), but a actually means another move leg, i.e. a continuation. Unlimited riders are N0 (NN is the old form, which we still accept).

Other issues: p was "clear path" but it's the cannon modifier, j was cannon but it's must-jump, h was locust but it's a direction modifier (half-plane, with hr/hl for the chiral halves), o was must-capture-first but it's cylindrical, and t was take-and-continue but it's tame (can't capture royalty). G was the giraffe but it's the tripper (3,3), and J was a jumping general but it's the old spelling of the camel (same as C). E, S, M, P and the u/x/y modifiers were non-standard.

New: q (curved), i (virgin), e (en passant), explicit (x,y) vectors, the universal leaper U, and multi-leg moves via a. The i/e/t ones need new optional BoardState hooks (isVirgin, isEnPassantTarget, isRoyal). @ and O are not implemented, since they need a hand and a move history rather than just coordinates.

@Perlkonig

Copy link
Copy Markdown
Member

I'm happy to have someone who actually has a clue about the notation to take a look! :D

@Perlkonig

Copy link
Copy Markdown
Member

AI review mentions the following. Something worth following up with?

2. U (universal leaper) gaps (low–medium)
U is special-cased in move generation, but:

Piece("U", …, HexAxialGeometry) will throw at construction because HexAxialGeometry.atomDeltas has no U case and applyGeometry always calls it.
The U path does not honour initialOnly (i), enPassantOnly (e), or tame (t), unlike leap/slide/hop generators.
If U is meant to be fully supported, those should be aligned.

3. Castling atom O — weak error (low)
@ gets a clear error. O falls through to expandAtom("O") → Unknown Betza atom: O. A dedicated message (as in the PR description) would be nicer.

I'll tweak the tests and documentation when I merge it.

@ypaul21

ypaul21 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Hm yeah, I should make it throw an error explicitly for O. And I'm not sure how those combine with the universal leaper U (it allows pieces to go anywhere except for the square that it is currently on, and it's used for the eternal emperor in Taikyoku Shogi). Maybe I'll make it throw too.

@ypaul21

ypaul21 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Okay, I think this should work

@Perlkonig
Perlkonig merged commit 80c340d into AbstractPlay:main Sep 7, 2026
1 check passed
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