Closed ddugovic closed 6 days ago
Thanks for the interest. It's not 100% clear what details you require, and/or if you are suggesting Lichess has made a change that we can also include? More than happy to review a suggested change and/or PR and/or link to Lichess code base etc.
It looks like you are using the game stream call/game export which can be 3 moves behind the game (as it's for streaming rather than playing, same with the general steam events). As the actual user of the game, and wanting to make moves to your game, you should be able to use the board api (similar to bot api) to get up to date info on game status etc, this is at /api/board/game/stream/:id
. Maybe this assumption is wrong as you are predicting moves from other games, rather than playing them real time?
I'm actually just interested in predicting game outcomes, so I'm content having more gameStart
/ gameFinish
data... predicting moves could be fun, but in most cases lila doesn't provide an adequate API (except for slow games compatible with Board API).
I created a PR for review https://github.com/Mind-Sports-Games/lila/pull/929
Thanks for the PR. We will look to review and probably release in the coming weeks.
This has now been release live, we only added the winner (PlayerIndex) which should be sufficient. You can obtain the colours of players independently.
In order to create a Twitch bot I needed to perform API calls to get game data, unlike Lichess where these events provide details such as opponent and winner/status: https://github.com/ddugovic/Twitch-Prediction-Lichess/tree/playstrategy