Skip to content

Latest commit

 

History

History
73 lines (60 loc) · 2.95 KB

chess.ts.md

File metadata and controls

73 lines (60 loc) · 2.95 KB

Home > chess.ts

chess.ts package

Classes

Class Description
Chess

Enumerations

Enumeration Description
Nag https://en.wikipedia.org/wiki/Numeric\_Annotation\_Glyphs

Functions

Function Description
algebraic(i) Converts a 0x88 square to algebraic notation.
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.
isColor(color)
isPieceSymbol(symbol)
isSquare(sq)
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.

Variables

Variable Description
BISHOP
BITS
BITSQUARES
BLACK
EMPTY
FLAGS
KING
KNIGHT
NagMap
PAWN
QUEEN
ROOK
SQUARES
WHITE

Type Aliases

Type Alias Description
BaseState
BitBoard
BitState
BoardState
Color
CommentMap
Move Represents a chess move
PartialMove
Piece
PieceSymbol
Square