01-29-2021, 09:40 AM
(This post was last modified: 01-29-2021, 09:43 AM by slimy_asparagus.)
(01-29-2021, 09:33 AM)Eric Piette Wrote: Hi,
To fix your problem you should modify your define called "IsInOmnicheck" in doing that inside
("IsInCheck" "King" #1)
That's the ludemeplex used to in all the chess like games to check if the king is threatened (just look Chess.lud)
But still we will look why you current define is not also doing the job.
Regards,
Eric
Eric,
That won't work because Black has two Kings. I need to be able to check that both Kings are in check (or that Black has lost one). The only way I can do that as far as I can see is to check by site index.
I put some comments in that explained why I handled the Check code the way I did. In particular the omnicheck concept allows my to handle the Check rules uniformly. I could do what you suggest for White, but it will never work for Black.