fixed case moves not existing
This commit is contained in:
parent
484400b36d
commit
8d55f84b01
1 changed files with 1 additions and 1 deletions
|
@ -762,7 +762,7 @@ if(typeof process!=="undefined" && process.title === "node") {
|
|||
return evaluation;
|
||||
}
|
||||
|
||||
if(aGame.mBoard.mMoves.length==0)
|
||||
if(!aGame.mBoard.mMoves || aGame.mBoard.mMoves.length==0)
|
||||
aGame.mBoard.GenerateMoves(aGame);
|
||||
if(aGame.mBoard.mMoves.length==1) { // only one possible move: pick it
|
||||
aGame.mBestMoves=[aGame.mBoard.mMoves[0]];
|
||||
|
|
Loading…
Reference in a new issue