Wouldn't that potentially break Hoplites?hgm wrote: I guess XBoard accepts only promotion suffixes if the move generator explicitly says the move is a promotion. Currently the Betza generator submits all moves to the callback as 'Normal'.
So I guess I would have to test for the piece being a Pawn, (i.e. represented by XBoard's Pawn image according to the pieceToCharTable) and in that case generate moves to last rank as White/BlackPromotionToQueen.
This would help, but of course in general the promotion zone isn't made up of the last N ranks: in Makruk it's the 6th rank, in Sittuyin (not a supported variant, I know) it would be the long diagonals on the opponent's side of the board.Of course it would be better if the Betza notation could tag the piece as promoting, so that you could have differently moving Pawns that each promote in one army. Like defining a Betza pseudo-atom '=' that means 'promotes on last rank', with a possibility to append a range for deeper zones (like "=3" in Grand Chess). Of course this could be extended with some notation for what it can promote to, but XBoard doesn't support that anyway, and always offers full choice on all (non-Shogi-style) promotions. (It is up to the engine to refuse an illegal choice.)
I'm not sure what the best way to describe the promotion zone would be. Sjaak uses a bitmask and some logic to decide whether promotions are mandatory or optional (they're optional if the piece can still move, mandatory if it would have no legal moves on its new location).
