scaljeri / chess.com

A chess bot for chess.com
64 stars 39 forks source link

modified wrapWithPromise code to eliminate error #32

Closed mccallw23 closed 2 years ago

mccallw23 commented 2 years ago

I believe this addresses one of the issues in the bugs channel. Also, my bot has a weird behavior where it plays the first move in the game but won't play anymore. I'm not using docker and yarn build in packages/bot compiles with no error. I'm on a mac as well. Any ideas?

scaljeri commented 2 years ago

I tested you branch and also noticed that the if you use the webassembly stockfish, it only does one move. And that is because I have that first move hard coded :) Then, for that second move, Stofish throws an error

image

But, when I configure a pure backend engine, it works like a charm. It played a whole match

image

mccallw23 commented 2 years ago

Hmmm, weird, when I switch to backend only and run lerna run build it builds fine, but lerna run start yields:

Screen Shot 2021-12-26 at 8 37 09 PM

I get an issue with a nonexistent directory.

not sure if this is related, but my tsconfig.json is complaining about overwriting issues...

Screen Shot 2021-12-26 at 8 45 34 PM

Thank you for your help! excited to get this working!

scaljeri commented 2 years ago

I didn't run lerna run start, I started the backend and frontend separately. So

$> cd packages/engine
$> npm run run:sf

and

$> cd packages/bot
$> npm start

Maybe that helps

scaljeri commented 2 years ago

I fixed the issue, it was an issue with SharedArrayBuffer. You can pull master!

scaljeri commented 2 years ago

Also, change your password for your chess.com account!!

mccallw23 commented 2 years ago

pulling master changed password. Thank you for the heads up. Will let you know what happens.