Class | Description |
---|---|
Chess |
Enumeration | Description |
---|---|
Nag | https://en.wikipedia.org/wiki/Numeric\_Annotation\_Glyphs |
Function | Description |
---|---|
algebraic(i) | Converts a 0x88 square to algebraic notation. |
boardToMap(board) | Converts a board state to a map of squares to piece symbols. |
file(i) | Extracts the zero-based file of an 0x88 square. |
generateMoves(state, options) | Return all moves for a given board state. |
hexToMove(state, move) | Converts a HexMove to a Move. |
isAttacked(state, square, color) | Checks if a square is attacked. If an attacking color is not provided, the opposite color of the piece on the square or the current turn is used. This function does not check if the attacking piece is pinned. |
isAttacking(state, square, targetSquare) | Checks if a square is attacking a target square. |
isColor(color) | |
isPieceSymbol(symbol) | |
isSquare(sq) | |
isThreatening(board, square, targetSquare) | Checks if a square is threatening a target square. |
mapToAscii(charMap, eol) | Renders a map of squares to characters on an ASCII board. |
moveToSan(state, move, moves, options) | |
rank(i) | Extracts the zero-based rank of an 0x88 square. |
sameDiagonal(sq1, sq2) | Tests if two squares are on the same diagonal. |
sameFile(sq1, sq2) | Tests if two squares are on the same file. |
sameMajorDiagonal(sq1, sq2) | Tests if two squares are on the same major diagonal. |
sameMinorDiagonal(sq1, sq2) | Tests if two squares are on the same minor diagonal. |
sameRank(sq1, sq2) | Tests if two squares are on the same rank. |
sameRankOrFile(sq1, sq2) | Tests if two squares are on the same rank or file. |
toBitState(state) |
Variable | Description |
---|---|
BISHOP | |
BITS | |
BITSQUARES | |
BLACK | |
EMPTY | |
FLAGS | |
KING | |
KNIGHT | |
NagMap | |
PAWN | |
QUEEN | |
ROOK | |
SQUARES | |
WHITE |
Type Alias | Description |
---|---|
BaseState | |
BitBoard | |
BitState | |
BoardState | |
Color | |
CommentMap | |
Move | Represents a chess move |
PartialMove | |
Piece | |
PieceSymbol | |
Square |