chess.js icon indicating copy to clipboard operation
chess.js copied to clipboard

Feature request: get count played moves

Open Orivoir opened this issue 3 years ago • 1 comments

Hello, at end of a FEN we find a info on the number of move already played, after the castling data

e.g: rnbqkbnr/pppp1ppp/8/4p3/4P3/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2

I dont find a method from this library for get the number of played moves.

Orivoir avatar Sep 10 '21 05:09 Orivoir

It is trivial to get the move count from the FEN, no?

parseInt(chess.fen().match(/\d+$/)[0])

slashinfty avatar Sep 13 '21 18:09 slashinfty