Esempio n. 1
0
 private static bool IsCheck(PieceColor color)
 {
     return(board
            .GetPieces(color.OppositeColor())
            .SelectMany(loc => board.GetPiece(loc).GetMoves(loc, board))
            .Any(destination => board.GetPiece(destination).Is(color, PieceType.King)));
 }