Beispiel #1
0
 private bool IsCheckFor(PieceColor color) =>
 GetAllMovesOf(color.Invert())
 .Any(m => Piece.Is(board.GetPiece(m.To), color, PieceType.King));
Beispiel #2
0
 private bool IsCheckFor(PieceColor color) =>
 HasMovesFor(color.Invert(),
             (from, to) => Piece.Is(board.GetPiece(to), color, PieceType.King));