mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 10:25:11 +02:00
Lower AI Level
This commit is contained in:
@@ -70,7 +70,7 @@ module.exports = class ChessCommand extends Command {
|
|||||||
if (user.bot) {
|
if (user.bot) {
|
||||||
prevPieces = Object.assign({}, game.exportJson().pieces);
|
prevPieces = Object.assign({}, game.exportJson().pieces);
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
game.aiMove(3);
|
game.aiMove(1);
|
||||||
const timeTaken = new Date() - now;
|
const timeTaken = new Date() - now;
|
||||||
if (gameState.turn === 'black') blackTime -= timeTaken - 5000;
|
if (gameState.turn === 'black') blackTime -= timeTaken - 5000;
|
||||||
if (gameState.turn === 'white') whiteTime -= timeTaken - 5000;
|
if (gameState.turn === 'white') whiteTime -= timeTaken - 5000;
|
||||||
|
|||||||
Reference in New Issue
Block a user