Lichess4545 / Chesster

Chesster Moderator Bot for Lichess45+45
28 stars 22 forks source link

Stalemate vs draw #332

Closed lakinwecker closed 4 years ago

lakinwecker commented 4 years ago

Fix stalemate vs draw for games like this: https://lichess.org/MNuION1F

lakinwecker commented 4 years ago

From: https://github.com/cyanfish/heltour/issues/349

Sesquipedalism commented 4 years ago

Another example where Chesster didn’t pick up the result for a game ending in stalemate: https://lichess.org/6dFDBIot

hopffgam commented 4 years ago

Unfortunately I got kind of stuck trying to set up the 4545 development environment, so I am just posting this here as a result of an unverified investigation, hoping that it will save lakinwecker 5 minutes or so:

https://github.com/endrawes0/Chesster/blob/ab0c53a2d21c96b63f4bf24c4162f91896ddb55c/src/lichess.ts#L373-L396 ignores the GameStatus.stalemate. In case of a stalemate it returns ResultEnum.UNKNOWN instead of ResultEnum.DRAW, which might be the root cause of this issue. Probably just adapting the condition in line 377 to status === GameStatus.draw || status === GameStatus.stalemate will do the trick.

lakinwecker commented 4 years ago

This has been fixed, but not deployed.