- Preparing search index...
- The search index is not available
Chess Bots
Properties
Private
chess
chess: Chess
Accessors
fen
- get fen(): string
-
Returns string
pgn
- get pgn(): string
-
Returns string
Methods
checkPromotion
- checkPromotion(from: Square, to: Square): boolean
-
Returns boolean
getLastMove
- getLastMove(): undefined | Move
-
Returns undefined | Move
getLegalMoves
- getLegalMoves(square?: Square): Move[]
-
Returns Move[]
getLegalSquares
- getLegalSquares(square?: Square): Square[]
-
Returns Square[]
getPieceSide
- getPieceSide(square: Square): undefined | Side
-
Returns undefined | Side
getPieceTypeFromSquare
- getPieceTypeFromSquare(square: Square): undefined | PieceType
-
Returns undefined | PieceType
hasPiece
- hasPiece(square: Square): boolean
-
Returns boolean
isCapture
- isCapture(move: Move): boolean
-
Returns boolean
isEnPassant
- isEnPassant(move: Move): boolean
-
Returns boolean
isGameFinished
- isGameFinished(): boolean
-
Returns boolean
isKingSideCastling
- isKingSideCastling(move: Move): boolean
-
Returns boolean
isQueenSideCastling
- isQueenSideCastling(move: Move): boolean
-
Returns boolean
loadPgn
- loadPgn(pgn: string): void
-
Returns void
The pgn to use. If undefined, a new game is created.