chess.js
chess.js copied to clipboard
Feature request: get count played moves
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.
It is trivial to get the move count from the FEN, no?
parseInt(chess.fen().match(/\d+$/)[0])