Fixed tournament tc: forgot to add the base time, after movestogo wraps aroung zero. what a dumbass...
Fixed Fischer clock as well. Rule says increment must be added before the move. Most chess UI do it wrong, adding the increment after the move, potentially after having flagged the engine. As a result, engine programmers conservatively assume that the GUI has this bug, and base their time management assumptions on it.
https://old.fide.com/fide/handbook.html ... ew=article
increment: 6.1. An amount of time (from 2 to 60 seconds) added from the start before each move for the player. This can be in either delay or cumulative mode