Handle the opponentGoneTrue and opponentGoneFalse states - if True we should try to claim victory after waiting for some time. Ideally I'd like to make it asynchronous - if we have to wait a long time to claim a win but then the opponent comes back, we want to start the search immediately. Don't worry about rate limiting for now, I'll do that part.
EDIT: we changed to busy polling but still able to restart the search immediately.
https://lichess.org/api#tag/Bot/operation/botGameStream
Handle the opponentGoneTrue and opponentGoneFalse states - if True we should try to claim victory after waiting for some time. Ideally I'd like to make it asynchronous - if we have to wait a long time to claim a win but then the opponent comes back, we want to start the search immediately. Don't worry about rate limiting for now, I'll do that part.
EDIT: we changed to busy polling but still able to restart the search immediately.
See https://github.com/KYLChiu/sporkfish/blob/master/sporkfish/lichess_bot/lichess_bot_berserk.py#L131 for examples of how we handle game states now.