mirror of
https://github.com/neogeek23/neogeek23.github.io.git
synced 2026-02-04 02:48:17 +00:00
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:
parent
fc541da7cc
commit
d9449c52d2
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user