ChessBoardVisualLib.ViewModel.ChessBoardViewModel.IsLegalMoveEnd C# (CSharp) Method

IsLegalMoveEnd() private method

private IsLegalMoveEnd ( Square moveEnd, MoveType &type ) : bool
moveEnd Square
type MoveType
return bool
        private bool IsLegalMoveEnd(Square moveEnd, out MoveType type)
        {
            var result = this.lastHighlightedSquares.Where((hs) => hs.Square == moveEnd);

            type = MoveType.Quiet;
            if (result.Count() > 0)
                type = result.First().MoveType;

            return result.Count() > 0;
        }