moverKingSafe property

bool get moverKingSafe

After makeMove, whether the side that just moved left its own king safe (i.e. the move was legal). Cheap legality filter for search/perft.

Implementation

bool get moverKingSafe =>
    !isSquareAttacked(_kingSquareOf(turn ^ 1), turn);