by aaroninsf · 3y ago · 0 comments
but I am perplexed by the assertion that confirming or checking-for `check` (as opposed to mate) is difficult.
Why is it not simply checking the attack surface of each piece from its current position? I understand there is occlusion, but that should be well-defined for collision-checking for taking already.
I.e. is this not the rule: "if none of the opposing 16 positions has the king's [prospective] position in their range of attack, the position is clear." Where range-of-attack are already defined.
If there is a problem with determining if a given range is subset by occlusion, that would seem to make preclude determining capture?
I must be missing something...
* again, straightforward if you have experience with computer rendering, CV, or similar domains, but less so in other domains.
Knight is the easiest, that's just checking (lol) the distance to see if 5-r/2 <= d < 5+r/2.