public bool IsChecked(ChessColor kingColor) { var king = chessBoard.GetKing(kingColor); return(chessBoard.Pieces .Where(p => p.Color != kingColor) .Any(p => movement .GetAvailableMoves(p) .Any(m => m.FinishedPosition == king.Position) )); }