Open Huub62 opened 2 months ago
It has built in method which returns all possible moves of current player and you can let computer start playing.
const moves = chess.moves({ verbose: true }) const randomMove = moves[Math.floor(Math.random() * moves.length)] chess.play(randomMove)
For a kids-chessgame I use chess.js and chessboard.js. Playing with white is easy, but how can i let chess.js make a first move and let the kids play with black?
Thanks in advance for any help.