BitBoard::Methods
BitBoard
The static constructor initializes the masks and the static entry for ChessEntities.
BitBoard(dotKnight.BitBoard)
Creates a BitBoard based on another BitBoard. This would be the equivalent of a Clone() method.
BitBoard(System.UInt64)
Creates a BitBoard based on a UInt64.
A8H1Attacks(System.Int32,System.Int32,System.Int32)
Calculates which squares are eligible for attack based on the Square and 'Signature' in the a8 to h1 direction

Returns:
   datatype : UInt64
Display
Display the bitboard on the System Console
Display(System.String)
Display the bitboard on the System Console with a title
FileAttacks(System.Int32,System.Int32)
Calculates which squares are eligible for attack based on the Square and 'Signature' of the File

Returns:
   datatype : UInt64
GetNextBlackSquare
Calculates which square is the next occupied square for Black

Returns:
   datatype : byte
GetNextWhiteSquare
Calculates which square is the next occupied square for White

Returns:
   datatype : byte
GetRotate45LSquare(System.Int32)
Returns the corresponding rotated square given any square for 45 degree left rotations

Returns:
   datatype : int
GetRotate45RSquare(System.Int32)
Returns the corresponding rotated square given any square for 45 degree right rotations

Returns:
   datatype : int
GetRotate90RSquare(System.Int32)
Returns the corresponding rotated square given any square for 90 degree rotations.

Returns:
   datatype : int
H8A1Attacks(System.Int32,System.Int32,System.Int32)
Calculates which squares are eligible for attack based on the Square and 'Signature' in the h8 to a1 direction

Returns:
   datatype : UInt64
InitMask
Initializes the Mask array
InitRankShift
Initializes the rank shifts array
InitRankShift90R
Initializes the rank shifts array for squares that are rotated 90 degrees
IsOccupied(System.Int32)
Determines if a square occupied

Returns:
   datatype : bool
op_BitwiseAnd(dotKnight.BitBoard,dotKnight.BitBoard)
Logically ANDs two BitBoards together.

Returns:
   datatype : UInt64
op_BitwiseOr(dotKnight.BitBoard,dotKnight.BitBoard)
Logically ORs two BitBoards together

Returns:
   datatype : UInt64
RankAttack(System.Int32,System.Int32)
Calculates which squares are eligible for attack based on the Square and 'Signature' of the Rank

Returns:
   datatype : UInt64
SetBoard(dotKnight.BitBoard)
Copies one existing BitBoard to another.
SetBoard(System.UInt64)
Sets the contents of an existing BitBoard to the RawBoard passed in.
SetSquare(System.Int32)
Sets Square to occupied.
ShiftToRank(System.Int32)
Shift the board for Rook Attacks

Returns:
   datatype : UInt64
ToggleSquare(System.Int32)
Change the state of the square from occupied => empty | empty => occupied
ToString
Formats a string representation of a BitBoard.

Returns:
   datatype : string
 
BitBoard::Properties
Count
ReadOnly property that tells how many bits are set in the current BitBoard
RawBoard
ReadOnly property that exposes the contents of the board
 
BitBoard::Private Data Members
Mask
BitBoard array (length:64) the contains a '1' in one square.
RankShift
Represents the number of rank shifts required for each square
RankShift90R
Represents the number of rank shifts required for each square rotated 90 degrees
Rotate45LMap
BitBoard mapping for squares rotated 45 degrees left. This is in the A8H1 direction. ChessSquares.htm#A8H1
Rotate45LMask
Represents the number of bits to mask off for each square rotated 45 degrees left. This is in the A8H1 direction.
Rotate45RMap
BitBoard mapping for squares rotated 45 degrees right. This is in the H8A1 direction. ChessSquares.htm#H8A1
Rotate45RMask
Represents the number of bits to mask off for each square rotated 45 degrees right. This is in the H8A1 direction.
Rotate90Map
Bitboard mapping for rotating 90 degrees ChessSquares.htm#90R
Shift45LMap
Represents the number of bits to shift for each square rotated 45 degrees left. This is in the A8H1 direction.
Shift45RMap
Represents the number of bits to shift for each square rotated 45 degrees right. This is in the H8A1 direction.
ulRawBoard
The contents of the board