Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 572 Bytes

chess.ts.chess.incheckmate.md

File metadata and controls

28 lines (18 loc) · 572 Bytes

Home > chess.ts > Chess > inCheckmate

Chess.inCheckmate() method

Returns true or false if the side to move has been checkmated.

Signature:

inCheckmate(): boolean;

Returns:

boolean

Example

const chess = new Chess(
    'rnb1kbnr/pppp1ppp/8/4p3/5PPq/8/PPPPP2P/RNBQKBNR w KQkq - 1 3'
)
chess.inCheckmate()
// -> true