/** * Attack detection for chess positions * * This module provides fast attack detection using bitboards for: * - Checking if a square is under attack * - Detecting check and checkmate * - Generating attack bitboards */ import { InternalBoard, Bitboard, SquareIndex, InternalColor } from '../types'; /** * Check if a square is attacked by a specific color * * @param board - Board to check * @param square - Square index to check * @param attackerColor - Color of attacking pieces * @returns true if square is attacked by attackerColor */ export declare function isSquareAttacked(board: InternalBoard, square: SquareIndex, attackerColor: InternalColor): boolean; /** * Check if the current player's king is in check * * @param board - Board to check * @returns true if king is in check */ export declare function isKingInCheck(board: InternalBoard): boolean; /** * Get all squares attacked by a specific color * * @param board - Board to check * @param attackerColor - Color of attacking pieces * @returns Bitboard of all attacked squares */ export declare function getAttackedSquares(board: InternalBoard, attackerColor: InternalColor): Bitboard; /** * Get all pieces attacking a specific square * * @param board - Board to check * @param square - Square being attacked * @param attackerColor - Color of attacking pieces * @returns Bitboard of all pieces attacking the square */ export declare function getAttackers(board: InternalBoard, square: SquareIndex, attackerColor: InternalColor): Bitboard; /** * Check if moving a piece would leave the king in check (pinned piece detection) * * @param board - Board state * @param from - Square piece is moving from * @param to - Square piece is moving to * @returns true if move would leave king in check */ export declare function wouldLeaveKingInCheck(board: InternalBoard, from: SquareIndex, to: SquareIndex): boolean; //# sourceMappingURL=AttackDetector.d.ts.map