mirror of
https://github.com/neogeek23/neogeek23.github.io.git
synced 2026-02-04 10:58:21 +00:00
Update ChessEngine.js
This commit is contained in:
parent
5c14f1b4d0
commit
2d4f4f9544
@ -120,8 +120,13 @@ class ChessBot{
|
|||||||
bestValue = currentValue;
|
bestValue = currentValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bestValue === 0) {
|
||||||
|
return this.determineSimplestBotMove(game, source, target);
|
||||||
|
} else {
|
||||||
return bestMove;
|
return bestMove;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mini_max_AB(depth, game, alpha, beta, isMaximizingPlayer){
|
mini_max_AB(depth, game, alpha, beta, isMaximizingPlayer){
|
||||||
if (depth === 0 && this.color === 'w'){
|
if (depth === 0 && this.color === 'w'){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user