lichess-org / chessground

Mobile/Web chess UI for lichess.org
https://lichess.org
GNU General Public License v3.0
1.01k stars 260 forks source link

[QUESTION] Is it possible to allow a player to move twice? #294

Open CharlieBrownCharacter opened 7 months ago

CharlieBrownCharacter commented 7 months ago

First of all, thank you very much for developing such a great library.

I have the following use case:

  1. Player A plays e5
  2. Player B plays e5
  3. Player A presses a button to withdraw the last play by Player B
  4. Player A takes his turn

Basically we have allowed Player A to play twice in a row.

I have tried using undoLastMove on step 3 but then what happens is that the next move on the board is still Player B when in fact it should be Player A.

Is this possible with this library? If yes, would you guys mind providing a small example or methods I can call to achieve this?