Update ChessEngine.js

This commit is contained in:
Brad Stein 2018-08-30 00:00:29 -05:00 committed by GitHub
parent ff4a5cf72a
commit 5c14f1b4d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ class ChessBot{
} else if (this.difficulty === 'Easy') { } else if (this.difficulty === 'Easy') {
nextMove = this.determineNextBestBotMoveOneMoveDeep(game, source, target); nextMove = this.determineNextBestBotMoveOneMoveDeep(game, source, target);
} else if (this.difficulty === 'Medium'){ } else if (this.difficulty === 'Medium'){
let depth = Math.floor(Math.random() * 3 + 2); let depth = Math.floor(Math.random() * 1 + 2);
console.clear(); console.clear();
console.log(depth + " moves ahead."); console.log(depth + " moves ahead.");
nextMove = this.determineBestBotMove(depth, game, true); nextMove = this.determineBestBotMove(depth, game, true);