Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RevealedAttacks ¶
RevealedAttacks returns sliding attacks after a piece has been removed to reveal new attacks. It is only necessary to look at slider pieces as only their attacks can be revealed.
Types ¶
type Attacks ¶
type Attacks struct { // the position key for which the attacks have been calculated Zobrist position.Key // bitboards of attacked/defended squares for each color and each from square // to get attackers us &^ ownPieces or & ownPieces for defenders From [ColorLength][SqLength]Bitboard // bitboards of attackers/defenders for each color and to square // to get attackers us &^ ownPieces or & ownPieces for defenders To [ColorLength][SqLength]Bitboard // bitboards for all attacked/defended squares of a color // to get attackers us &^ ownPieces or & ownPieces for defenders All [ColorLength]Bitboard // bitboards of attacked/defended squares for each color and each piece type // to get attackers us &^ ownPieces or & ownPieces for defenders Piece [ColorLength][PtLength]Bitboard // sum of possible moves for each color (moves to ownPieces already excluded) Mobility [ColorLength]int // pawn attacks - squares attacked by pawn of the given color Pawns [ColorLength]Bitboard // pawn double - squares which are attacked twice by pawns of the given color PawnsDouble [ColorLength]Bitboard // contains filtered or unexported fields }
Attacks is a data structure to store all attacks and defends of a position.
Click to show internal directories.
Click to hide internal directories.