I got my diagram to play Chess with the AI, but there were some issues.
It allowed me to make various illegal moves, such as moving to any empty space, capturing a piece with a non-capturing move, and capturing a piece in a piece's line of movement even though movement there is blocked.
When I checkmated the King, it did not recognize this and just made an illegal move instead.
When I captured the King, it still continued the game.
When I captured all pieces except one blocked Pawn, it said Thinking.
It then let me make two moves in a row to capture the remaining piece, at which time it said "It seems I have already lost!"
Some of these issues are caused by the fact that the Diagram definition contains the line royal=1, which designates the Pawns as the royal piece (as these were the first piece in the table). So it only considers the game lost when it runs out of Pawns (as the default is extinction royalty). The royal parameter indicates which piece type is royal, not that royalty plays a role. Some variants have multiple royal types (and would need multiple royal= parameters). By default the last mentioned piece would be considered the royal (here: King). To switch off royalty you would have to mention a non-existing piece type (e.g. royal=-1).
That it is does not enforce legality (or even turn order) is intentional, to make it easy to set up positions. The purpose of the Diagram is not primarily to act as an opponent, but also to get an idea for how pieces move. Especially for (multi-)hoppers and locusts it is difficult to understand the move from a static move diagram. There actually exists a parameter that can make the Diagram enforce legality, but that would severely hinder these other functions.
The Interactive Diagram is primarily designed as a replacement for the wooden chess equipment people woul have at home (but not with the desired board size or number of available pieces); such boards also do not complain when you make illegal moves.
Some of these issues are caused by the fact that the Diagram definition contains the line royal=1, which designates the Pawns as the royal piece (as these were the first piece in the table). So it only considers the game lost when it runs out of Pawns (as the default is extinction royalty). The royal parameter indicates which piece type is royal, not that royalty plays a role. Some variants have multiple royal types (and would need multiple royal= parameters). By default the last mentioned piece would be considered the royal (here: King). To switch off royalty you would have to mention a non-existing piece type (e.g. royal=-1).
That it is does not enforce legality (or even turn order) is intentional, to make it easy to set up positions. The purpose of the Diagram is not primarily to act as an opponent, but also to get an idea for how pieces move. Especially for (multi-)hoppers and locusts it is difficult to understand the move from a static move diagram. There actually exists a parameter that can make the Diagram enforce legality, but that would severely hinder these other functions.
The Interactive Diagram is primarily designed as a replacement for the wooden chess equipment people woul have at home (but not with the desired board size or number of available pieces); such boards also do not complain when you make illegal moves.