Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 699 Bytes

chess.ts.isattacking.md

File metadata and controls

26 lines (16 loc) · 699 Bytes

Home > chess.ts > isAttacking

isAttacking() function

Checks if a square is attacking a target square.

Signature:

export declare function isAttacking(state: Readonly<BoardState>, square: number, targetSquare: number): boolean;

Parameters

Parameter Type Description
state Readonly<BoardState> Board state
square number Attacking square
targetSquare number Target square

Returns:

boolean