Skip to content

Commit

Permalink
Merge 3ab8d40 into b406e5a
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Aug 30, 2021
2 parents b406e5a + 3ab8d40 commit 4ce61ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"react-cookies": "^0.1.0",
"redux": "^4.1.0",
"rfc6902": "^4.0.2",
"setimmediate": "^1.0.5",
"socket.io": "^4.1.3",
"socket.io-client": "^4.1.3",
"svelte": "^3.41.0",
Expand Down
3 changes: 2 additions & 1 deletion src/ai/mcts-bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
import 'setimmediate';
import { CreateGameReducer } from '../core/reducer';
import { Bot } from './bot';
import type { BotAction } from './bot';
Expand Down Expand Up @@ -313,7 +314,7 @@ export class MCTSBot extends Bot {
const asyncIteration = () => {
if (this.iterationCounter < numIterations) {
iteration();
setTimeout(asyncIteration, 0);
setImmediate(asyncIteration);
} else {
resolve(getResult());
}
Expand Down

0 comments on commit 4ce61ee

Please sign in to comment.