Support variants that can split pieces
CECP is extended by a new engine-GUI command 'split', which transfers a
matrix that specifies which piece should be left on the from-square after
a move. This can be dependent on the moved piece type, but also on the
type it promotes to. It is transferred as a matrix filled with the ID of
the piece to be left behind, where rows are separated by slashes. Each row
starts with the ID for non-promoting moves, and then (optionally) continues
with the cases for promotion choices in pieceToCharTable order.
E.g., to have a Knight leave behind Pawns in otherwise normal Chess,
the engine can send:
split /P//////p
where non-,emmtioned and empty rows are taken to specify the from-square
should be left empty. To specify promotion to Knight should actually give
you two Knights (other promotions being unaffected) the engine could send
split --N//////--------n
The split command only works in engine-defined variants, and should be
sent after 'setup' in order for the pieceToCharTable (needed to interpret
it) to be known.
Beware that the format allows for enemy promotion, so that the black
promotion choices come late in the row.