Game/GameManager.cs
/// <summary>
/// Gets all coordinates from a given player, may ignore king coordinates to prevent looping
/// </summary>
/// <param name="pieceColor"></param>
/// <param name="ignoreKing"></param>
/// <param name="xRay"></param>
/// <returns></returns>
Gets all coordinates from a given player, may ignore king coordinates to prevent looping
Gets all coordinates from a given player may ignore king coordinates to prevent looping
public List<Coords> GetAllAvailableCoords(PieceColor pieceColor, bool ignoreKing = false, bool xRay = false)
        {
            List<Coords> availableCoords =
                GetAllAvailableCoords(pieceColor == PieceColor.White ? Board.WhitePieces : Board.BlackPieces, xRay)
                    .Distinct()
                    .ToList();
            if (ignoreKing)
                return availableCoords;
            return availableCoords
                .Concat(GetKingAvailableCoords(pieceColor == PieceColor.White ? Board.WhiteKing : Board.BlackKing))
                .ToList();
        }
public List < Coords > GetAllAvailableCoords ( PieceColor pieceColor , bool ignoreKing = false , bool xRay = false ) { List < Coords > availableCoords = GetAllAvailableCoords ( pieceColor == PieceColor . White ? Board . WhitePieces : Board . BlackPieces , xRay ) . Distinct ( ) . ToList ( ) ; if ( ignoreKing ) return availableCoords ; return availableCoords . Concat ( GetKingAvailableCoords ( pieceColor == PieceColor . White ? Board . WhiteKing : Board . BlackKing ) ) . ToList ( ) ; }
Gets all coordinates from a given player, may ignore king coordinates to prevent looping
Gets all coordinates from a given player may ignore king coordinates to prevent looping
None
pieceColor
PieceColor
None
ignoreKing
bool
None
xRay
bool
None