Update ChessEngine.js

Rather than throwing a fit and crashing when you win, the bot now politely asks for a rematch.
This commit is contained in:
Brad Stein 2018-10-28 22:40:42 -05:00 committed by GitHub
parent fc541da7cc
commit d9449c52d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,8 @@ class ChessBot{
game.move(nextMove);
board.position(game.fen());
}else {
throw "difficulty not recognized" + this.difficulty;
alert("I concede, you win. Could we rematch though, please?");
chess_main();
}
}