/** * Internal board representation using hybrid bitboards + mailbox * * This module provides the core board state with: * - Bitboards for fast attack detection and piece locations * - Mailbox (Int8Array) for O(1) piece lookup by square * - Zobrist hashing for transposition table * - Efficient copying and comparison */ import { InternalBoard, Piece, InternalColor, SquareIndex, Bitboard } from '../types'; /** * Create a new empty internal board * * @returns Empty board with no pieces */ export declare function createEmptyBoard(): InternalBoard; /** * Create a new board for the starting position * * @returns Board set up for standard chess starting position */ export declare function createStartingBoard(): InternalBoard; /** * Set a piece on the board * * @param board - Board to modify * @param index - Square index (0-63) * @param piece - Piece to place */ export declare function setPiece(board: InternalBoard, index: SquareIndex, piece: Piece): void; /** * Remove a piece from the board * * @param board - Board to modify * @param index - Square index (0-63) */ export declare function removePiece(board: InternalBoard, index: SquareIndex): void; /** * Get the piece at a square * * @param board - Board to query * @param index - Square index (0-63) * @returns Piece at the square */ export declare function getPiece(board: InternalBoard, index: SquareIndex): Piece; /** * Get the bitboard for a specific piece type * * @param board - Board to query * @param piece - Piece type * @returns Bitboard with all pieces of this type */ export declare function getBitboard(board: InternalBoard, piece: Piece): Bitboard; /** * Copy a board (efficient struct copy) * * @param source - Source board * @returns New board with same state */ export declare function copyBoard(source: InternalBoard): InternalBoard; /** * Check if a piece belongs to a specific color * * @param piece - Piece to check * @param color - Color to check * @returns true if piece is of the given color */ export declare function isPieceColor(piece: Piece, color: InternalColor): boolean; /** * Get the color of a piece * * @param piece - Piece to check * @returns Color of the piece, or null if empty */ export declare function getPieceColor(piece: Piece): InternalColor | null; /** * Get the opposite color * * @param color - Color * @returns Opposite color */ export declare function oppositeColor(color: InternalColor): InternalColor; /** * Check if a square is empty * * @param board - Board to check * @param index - Square index * @returns true if square is empty */ export declare function isSquareEmpty(board: InternalBoard, index: SquareIndex): boolean; /** * Check if a square is occupied by an enemy piece * * @param board - Board to check * @param index - Square index * @param color - Our color * @returns true if square has enemy piece */ export declare function isSquareEnemy(board: InternalBoard, index: SquareIndex, color: InternalColor): boolean; /** * Check if a square is occupied by a friendly piece * * @param board - Board to check * @param index - Square index * @param color - Our color * @returns true if square has friendly piece */ export declare function isSquareFriendly(board: InternalBoard, index: SquareIndex, color: InternalColor): boolean; //# sourceMappingURL=Board.d.ts.map