[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Single Comment
I just reread your message. My idea was for something you already know how to do. But the principle behind it might be re-employed for making the King move out of check on the first move. Use two move-types. On the second move-type, check whether your King is in check. Search for the King's position, then check whether its position is attacked. I think you can just replace 'not-enemy?' with 'not-friend?' and 'defended?' with 'not-attacked?'. This will allow a second move only when the King is not in check. Thus, it will have to get out of check on the first move to get out of check at all.