Replies: 1 comment
-
If I am up to date on this: Instead of running many high resolution timers, the opponent's client calls the flag, like a human would call an arbiter, and the server then checks the clocks. And then there is a periodic job that cleans up left-over games where the clocks expired but no one was around. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am totally unfamiliar with lila source code and Scala.
I assume what lila have something like global state with active games, or active games are stored in the MongoDB.
It's pretty clear what lila can check players' time before each move, but how lila determines, what time is up, even if both players don't make moves?
I see two solutions:
• Lila multiple times in a second checks all active games for overdue time, or uses redis with its TTL system for this somehow.
• Lila schedules running a task like "StopGameBecauseOfTimeOverdue" in remaining time of the player who made the last move, and cancels a previously scheduled task after each move.
How lila does this in practice?
Beta Was this translation helpful? Give feedback.
All reactions