Documentation ¶
Overview ¶
Move generation
Index ¶
- Constants
- func GetAllCaptures(cb *board.Board) []board.Move
- func GetAllMoves(cb *board.Board) []board.Move
- func GetAttackedSquares(cb *board.Board) uint64
- func GetCheckingSquares(cb *board.Board) (uint64, int)
- func GetKingMoves(square int8, oppAttackedSquares uint64, cb *board.Board) uint64
- func GetPawnMoves(square int8, cb *board.Board) uint64
- func IsValidMove(from, to int8, pieceType uint8, cb *board.Board) bool
- func MovePiece(move board.Move, cb *board.Board)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func GetAllCaptures ¶
Return slice of all pseudo-legal captures for color cb.WToMove, where any king moves are strictly legal. However, if the king is in check, only legal moves are returned
func GetAllMoves ¶
Return slice of all pseudo-legal moves for color cb.WToMove, where any king moves are strictly legal. However, if the king is in check, only legal moves are returned
func GetAttackedSquares ¶
Return the set of squares attacked by color cb.WToMove
func GetCheckingSquares ¶
Return the set of squares of pieces checking the king and interposition squares, and the number of checking pieces.
func GetKingMoves ¶
Return legal king moves.
func IsValidMove ¶
Use for user-submitted moves only? Checks for blocking pieces and disallows captures of friendly pieces. Does not consider check, pins, or legality of a pawn movement direction.
Types ¶
This section is empty.