/** * Chess-specific Action implementation */ import { BaseAction, Action } from "../base/action"; /** * Chess piece types */ export declare enum PieceType { PAWN = "pawn", ROOK = "rook", KNIGHT = "knight", BISHOP = "bishop", QUEEN = "queen", KING = "king" } /** * Chess colors */ export declare enum Color { WHITE = "white", BLACK = "black" } /** * Chess square representation */ export interface Square { file: string; rank: number; } /** * Chess piece representation */ export interface ChessPiece { type: PieceType; color: Color; position: Square; hasMoved?: boolean; } /** * Chess move types */ export declare enum MoveType { NORMAL = "normal", CAPTURE = "capture", CASTLE_KINGSIDE = "castle_kingside", CASTLE_QUEENSIDE = "castle_queenside", EN_PASSANT = "en_passant", PROMOTION = "promotion" } /** * Chess-specific action representing a move */ export declare class ChessAction extends BaseAction { readonly from: Square; readonly to: Square; readonly moveType: MoveType; readonly piece: ChessPiece; readonly capturedPiece: ChessPiece | undefined; readonly promotionPiece: PieceType | undefined; readonly notation: string; constructor(from: Square, to: Square, piece: ChessPiece, moveType?: MoveType, capturedPiece?: ChessPiece, promotionPiece?: PieceType); /** * Check if this is a capture move */ isCapture(): boolean; /** * Check if this is a castling move */ isCastling(): boolean; /** * Check if this is a promotion move */ isPromotion(): boolean; /** * Get the distance moved (for analysis purposes) */ getDistance(): number; /** * Get the direction of the move */ getDirection(): { file: number; rank: number; }; /** * Check if move is diagonal */ isDiagonal(): boolean; /** * Check if move is straight (horizontal or vertical) */ isStraight(): boolean; /** * Clone this action */ clone(): ChessAction; /** * Check if this action is valid */ isValid(): boolean; /** * Get the cost/complexity of this move */ getCost(): number; /** * Get action metadata */ getMetadata(): Record; /** * Get hash key for this action */ getHashKey(): string; /** * Check equality with another action */ equals(other: Action): boolean; /** * Serialize to JSON string */ serialize(): string; /** * Get detailed JSON representation */ toJSON(): Record; /** * Get detailed move information for analysis */ getAnalysisInfo(): Record; /** * String representation */ toString(): string; /** * Convert square to string notation */ static squareToString(square: Square): string; /** * Convert string notation to square */ static stringToSquare(notation: string): Square; /** * Check if two squares are equal */ static squaresEqual(square1: Square, square2: Square): boolean; /** * Calculate distance between two squares */ static squareDistance(square1: Square, square2: Square): number; private validateMove; private isValidSquare; private generateAlgebraicNotation; private isDevelopmentMove; private controlsCenter; private affectsKingSafety; } //# sourceMappingURL=chess-action.d.ts.map