H. G. Muller wrote on Tue, Aug 11, 2020 03:39 PM UTC:
I made a rule-enforcing Game Courier preset for Odin's Rune Chess. I chose this as a test case for the GAME code that the Play-Test Applet automatically generated, because it is notorious for having pieces with very unusual moves (causing side effects of various kinds). This makes it a good test for how such moves with side effects can be entered by means of mouse clicks. The preset can be found here.
There already was a preset for Odin't Rune Chess, but it did not enforce rules. It is still there, but now it doesn't even know the initial position, and shows the one for orthodox Chess. Last month that was different, so I don't know what happened to it.
Two modes for entering side effects
After some experimenting it became clear to me that there are two mutually incompatible ways to handle side effects with the mouse. Because mouse entry is limited to normal moves (i.e. defined by two squares, the origin and destination) and 'pass' (through the new button), but cannot be used to enter suicides or piece drops, everything has to be disguised as moves. For pieces like the Chu-Shogi Lion, which capture 'in passing' as part of a double move, the natural method is to just make the two moves: the first leg captures the piece, the second leg moves from the square where that happened to the final destination. If you want to stay at the capture square, you can pass the second move.
This way of entering moves turned out to be quite unnatural for the Forest Ox, which is described as a Knight that can make a piece adjacent to its destination disappear. This doesn't suggest the disappearence is the result of a double move, as the first move you would then have to make to get to the victim is often a very strange one (Camel or Zebra), different all the time, and how you then should get to the destination is very much dependent on where you came from. It is much more intuitive to consider the Forest Ox a Knight that can optionally make a King-like rifle capture as second move.
Something similar holds for the Valkyrie, which needs to drop a piece (the friend it just 'captured') as a side effect, rather than remove one. It also feels very unnatural to first have to move to an empty square to 'mark it for unloading', and from there perform a swap with the piece at the destination. It is much more intuitive to just capture the friend you want to displace, and then select the square where it should go to.
To accomodate that, the GAME code can be configured by defining an array shooters', containing the piece types for which side effects have to be entered after the main move. In this preset for Odin's Rune Chess this is set like
set shooters (Q q N n);
because both the Forest Ox (N) and Valkyrie (Q) fall in this class. For such pieces you always move them directly to their destination. If the move has / could have a side effect, which is not yet unambiguously defined, you will be prompted for that side effect. You can then click the just-moved piece again, to turn on highlights of the squares that could be affected by the move, and click the square where you want to apply the side effect. For a Valkyrie friendly capture this would then put the captured piece there, for a Forest Ox it would remove the clicked piece. If the side effect is optional, and the move could be made without one, you can click the Pass button.
Pieces not mentioned in the shooters array will behave as double movers, which should first be moved to the square of the side effect, and then to their destination. If the side effect is not possible on the destination of the first move (e.g. because the side effect is a capture, but the square is empty) it will be considered the final destination right away. If a side effect at the first destination is possible, but the move itself would already be pseudo-legal by ending there without side effect, the Pass button can be used to leave it at that. Otherwise you just click one of the possible final destinations, after switching on their highlights through clicking the moving piece again.
If there is a single mandatory side effect (such as when the Valkyrie captures an adjacent friendly piece; then it has to swap places with the Valkyrie), the user will not be prompted for a side effect, but the move will be auto-completed instead.
I made a rule-enforcing Game Courier preset for Odin's Rune Chess. I chose this as a test case for the GAME code that the Play-Test Applet automatically generated, because it is notorious for having pieces with very unusual moves (causing side effects of various kinds). This makes it a good test for how such moves with side effects can be entered by means of mouse clicks. The preset can be found here.
There already was a preset for Odin't Rune Chess, but it did not enforce rules. It is still there, but now it doesn't even know the initial position, and shows the one for orthodox Chess. Last month that was different, so I don't know what happened to it.
Two modes for entering side effects
After some experimenting it became clear to me that there are two mutually incompatible ways to handle side effects with the mouse. Because mouse entry is limited to normal moves (i.e. defined by two squares, the origin and destination) and 'pass' (through the new button), but cannot be used to enter suicides or piece drops, everything has to be disguised as moves. For pieces like the Chu-Shogi Lion, which capture 'in passing' as part of a double move, the natural method is to just make the two moves: the first leg captures the piece, the second leg moves from the square where that happened to the final destination. If you want to stay at the capture square, you can pass the second move.
This way of entering moves turned out to be quite unnatural for the Forest Ox, which is described as a Knight that can make a piece adjacent to its destination disappear. This doesn't suggest the disappearence is the result of a double move, as the first move you would then have to make to get to the victim is often a very strange one (Camel or Zebra), different all the time, and how you then should get to the destination is very much dependent on where you came from. It is much more intuitive to consider the Forest Ox a Knight that can optionally make a King-like rifle capture as second move.
Something similar holds for the Valkyrie, which needs to drop a piece (the friend it just 'captured') as a side effect, rather than remove one. It also feels very unnatural to first have to move to an empty square to 'mark it for unloading', and from there perform a swap with the piece at the destination. It is much more intuitive to just capture the friend you want to displace, and then select the square where it should go to.
To accomodate that, the GAME code can be configured by defining an array shooters', containing the piece types for which side effects have to be entered after the main move. In this preset for Odin's Rune Chess this is set like
because both the Forest Ox (N) and Valkyrie (Q) fall in this class. For such pieces you always move them directly to their destination. If the move has / could have a side effect, which is not yet unambiguously defined, you will be prompted for that side effect. You can then click the just-moved piece again, to turn on highlights of the squares that could be affected by the move, and click the square where you want to apply the side effect. For a Valkyrie friendly capture this would then put the captured piece there, for a Forest Ox it would remove the clicked piece. If the side effect is optional, and the move could be made without one, you can click the Pass button.
Pieces not mentioned in the shooters array will behave as double movers, which should first be moved to the square of the side effect, and then to their destination. If the side effect is not possible on the destination of the first move (e.g. because the side effect is a capture, but the square is empty) it will be considered the final destination right away. If a side effect at the first destination is possible, but the move itself would already be pseudo-legal by ending there without side effect, the Pass button can be used to leave it at that. Otherwise you just click one of the possible final destinations, after switching on their highlights through clicking the moving piece again.
If there is a single mandatory side effect (such as when the Valkyrie captures an adjacent friendly piece; then it has to swap places with the Valkyrie), the user will not be prompted for a side effect, but the move will be auto-completed instead.