Closed victorocna closed 2 years ago
can you please give me an example of setPieces
usage in javascript?
Figured it out. An example for posterity below:
setPieces({ a8: { role: 'queen', color: 'white', promoted: true } });
The only problem is that now the pawn that should be promoted does not disappear from the board.
Include a7: null
. Or alternatively just set({fen})
, and let chessground compute the incremental update.
Hello everyone!
I was wondering if it's possible to promote a pawn into any other piece. From the API I noticed that
chess.move()
takes onlyorig
anddest
parameters. Is there any way to pass the new piece a pawn is promoted to?Cheers, Victor