[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Single Comment
I expect these two ideas could be combined together for greater efficiency. Search for a King. When one is found, verify that it's either an undefended enemy King or an unattacked friend King. If that verification succeeds, continue searching for the other King. Check whether it's either an undefended enemy King or an unattacked friend King. If that verification succeeds, the move can proceed. So, it works like this. A second move is allowed only if neither King is in check. So, this ends a turn when the first move is a check, and it forces a player to get out of check on the first move.