Important comment added.
Implemented detection of squares where king will be attacked by the opponent's pieces in a robust way! It's a first time I used new position generation to detect moves allowance.
Important comment added.
Reused a convenient method to determine the squares occupied by our side.
Comments.
+2 tests for reassurance.