[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Check out Janggi (Korean Chess), our featured variant for December, 2024.
Check out Janggi (Korean Chess), our featured variant for December, 2024.
Indeed, I still have to do some more work on this. The current code only works when the attacked square is at the end of the attacker's range, which is always true for leapers, and true for sliders when castling occurs on the back rank. But not when it occurs on 2nd rank.
I treat the 'passing through check' rule as e.p. capture of the King. So castling, but also sliding royals like in Caissa Brittania set an entire series of e.p. squares along their path. (Where castling is special, as even the origin is an e.p. square there.) When such e.p. squares are created by the move of a royal piece, any normal capture will also be allowed to e.p. capture (and hence make the previous move illegal in variants that have the checking rule). But this only works when sliders, which normally can only capture someting at the furthest square of their range, must test for e.p. capture on all squares en route to that too, to detect whether their path intersects the ray of e.p. squares. I did not do that yet. (So Caissa Brittania would also not work, had it been automated through the Applet.)