My apologies for those who might have already tried to use this feature: I changed it again, in order to simplify the code, and make it more efficient for other purposes the morph parameter has in the Interactive Diagram, namely confining pieces to a board zone. There are now no longer separate morphers and morphs array for each color, but they must be combined into one:
set morphers (X Y Z x y z);
set morphs assoc
X ((All Q))
Y ((R N B Q Q B N R))
Z ((All Q) (All R) (All B))
x ((All q))
y ((r n b q q b n r))
z ((All q) (All r) (All b))
;
The rule that the ranks should be listed starting at the promotion zone (so high to low for white pieces, low to high for black) still applies.
The idea is that a future version would allow you to specify the words 'barred', 'check' or 'win' instead of the label of the piece to promote to; this would then (respectively) ban moves to the corresponding square, treat reaching the square as a check to the opponent (so that he loses when he cannot remove the piece from that square in his next turn, but wins when he captures your King), or terminate the game immediately as a win (without having to worry about possible retaliation against the piece that reached the square, or your King).
My apologies for those who might have already tried to use this feature: I changed it again, in order to simplify the code, and make it more efficient for other purposes the morph parameter has in the Interactive Diagram, namely confining pieces to a board zone. There are now no longer separate morphers and morphs array for each color, but they must be combined into one:
The rule that the ranks should be listed starting at the promotion zone (so high to low for white pieces, low to high for black) still applies.
The idea is that a future version would allow you to specify the words 'barred', 'check' or 'win' instead of the label of the piece to promote to; this would then (respectively) ban moves to the corresponding square, treat reaching the square as a check to the opponent (so that he loses when he cannot remove the piece from that square in his next turn, but wins when he captures your King), or terminate the game immediately as a win (without having to worry about possible retaliation against the piece that reached the square, or your King).