jhlywa / chess.js

A TypeScript chess library for chess move generation/validation, piece placement/movement, and check/checkmate/draw detection
BSD 2-Clause "Simplified" License
3.72k stars 891 forks source link

Redo a move #204

Open nickborti opened 5 years ago

nickborti commented 5 years ago

I have found out the way to undo a move. How can I redo now?

balinterdi commented 5 years ago

@nickborti How do you undo a move?

nickborti commented 5 years ago

@balinterdi It's there in the chess.js library. source

JohnnyBlomgren commented 4 years ago

Store the moves in a separate array. This will help you create a timeline where you can rewind and fast forward time throughout the whole game. I intend to do so soon