Check out Janggi (Korean Chess), our featured variant for December, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Interactive diagrams. (Updated!) Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sun, Oct 20 01:18 PM UTC in reply to H. G. Muller from Sat Oct 19 07:43 PM:

The captureMatrix only looks at the pieces on the origin and destination. For multiple capture it would have to be not a matrix but a multi-dimensional object.

But I did not see that as a problem.

BTW, it is still possible to handle more complex cases by scripting. By defining an xxxTinker() JavaScript routine you can examine the move it is passed as argument, and set the '64' bit of the variable 'kind' to let the move trigger the forced pass (kind |= 64;). Or the '32' bit to make it a prioritized move.

Well, to be fair, usually it isn't. The problem I was having was that hit-and-run captures weren't triggering the forced pass. I tend to prefer consistency in my rulesets. But thanks for letting me know about the scripting option.

Since I see that in the source code Tinker() still only takes two parameters, I'm assuming by kind you are referring to the in-source variable here.

Edit: I tried your recommendation by editing the diagram to my previous comment, and it works perfectly with all capture situations. Thanks.

In the current form the rule thus gives the closest approximation to the original Chu-Shogi rules. You can even allow bridge capture, by exempting the caKcabK moves from application of the capture matrix by suffixing those moves with an apostrophy. (No way to still forbid it when bridged by P or GB, though.)

You could just use the tradeThreshold=N parameter for that, and have the forbidden bridge-captures be the first N pieces in the list.