Strryke / betafish

A chess engine and AI move finder written in Javascript. Beats Stockfish level 6 on Lichess.
https://betafish.gavinong.com
MIT License
95 stars 10 forks source link

Added var to undeclared variables #5

Closed MichaelYoon-rgb closed 1 year ago

MichaelYoon-rgb commented 1 year ago

First commit: Some variables declared in betafish.js were without "var" at the start, causing uninitialised errors. Fixed all of them in this pull request.

Second commit: fixes a bug that causes BestMove to be 0 when the time limit is exceeded. Moved SearchController.stop check further down, such that if the time limit exceeds it waits for the next move to be generated before returning. Allowing a move to always be returned

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
betafish ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2023 7:40pm
Strryke commented 1 year ago

cool, looks good to me, thanks Michael, nice catches!