Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No undo and redo for moves #17

Open
PedanticHacker opened this issue Jun 7, 2021 · 1 comment
Open

No undo and redo for moves #17

PedanticHacker opened this issue Jun 7, 2021 · 1 comment

Comments

@PedanticHacker
Copy link

First of all, thank you for this wonderful chessboard component! It's awesome!

But I didn't find anything that would make the moves be undone and redone. So no undo and redo yet? It would be nice that the mouse wheel event would undo/redo moves if scrolling up/down is done in the chessboard area.

A movelist would also be nice. Just a simple table that displays all the moves.

Just my 2 cents.

@cemslord
Copy link

gameHistory = chess.history({
	verbose: true
});

use chess.js
for (i = 0; i < gameHistory.length; i++) {
chess.undo();
}

fenStartingPosition = chess.fen();

u can undo redo now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants