Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getNextMove needs to be async #15

Open
thinktt opened this issue Jan 25, 2021 · 1 comment
Open

getNextMove needs to be async #15

thinktt opened this issue Jan 25, 2021 · 1 comment

Comments

@thinktt
Copy link

thinktt commented Jan 25, 2021

I've been enjoying playing with this library. I love the simplicity of it. I was going to plug an engine in to it but I noticed something that appears to be an issue. Shouldn't the getNextMove be async? If we call an engine from this method aren't we blocking the thread and the strean from lichess?

Am I missing something here? I haven't looked into the code to deeply.

@thinktt
Copy link
Author

thinktt commented Jan 27, 2021

I figured this out, it's fairly trivial to change it to async. I can think of some reasons why you might not want to I guess, but seems like if you wanted bot-o-tron to play multiple game at once it could be an issue unless I'm not understanding how this is built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant