Created
December 26, 2016 19:43
-
-
Save Ravenslofty/a87111a13bf769e20a557f566efa0468 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 265 func Illegal(b *Board) bool { | |
| 266 king, err := FindKing(b, 1-b.ToMove) | |
| 267 if err != nil { | |
| 268 return true | |
| 269 } | |
| 270 | |
| 271 return !squareattacked(b, king, b.ToMove) | |
| 272 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment