diff --git a/src/Go/boardAnalysis/goAI.ts b/src/Go/boardAnalysis/goAI.ts index 5fc1174fe..9a3623d14 100644 --- a/src/Go/boardAnalysis/goAI.ts +++ b/src/Go/boardAnalysis/goAI.ts @@ -32,6 +32,9 @@ const playerPromises: Record = { [GoColor.black]: { nextTurn: Promise.resolve(gameOver), resolver: null }, [GoColor.white]: { nextTurn: Promise.resolve(gameOver), resolver: null }, }; +// The promises aren't in a fully working state until we do this. +// It is OK to reset the AI multiple times in a row. +resetAI(); export function getNextTurn(color: GoColor.black | GoColor.white): Promise { return playerPromises[color].nextTurn;