jkomoros / boardgame

An in-progress framework in golang to easily build boardgame Progressive Web Apps
Apache License 2.0
31 stars 4 forks source link

When remastering a golden, moves at the beginning or end should modify the game timestamps #766

Open jkomoros opened 4 years ago

jkomoros commented 4 years ago

Originally captured in #701

If new moves are in the middle, we evenly split the timestamps between existing moves in the golden. But if the new moves are at the beginning or end of the game, we simply copy the beginning/end time. That's not ideal because it means that you'll have timestamps that appear to be at the same literal time instead of monotonically increasing.

Ideally we'd extend the timestamps based on how far they differ from their next moves in the new record. When we extend the start of the game and end, we'd need to modify all subsequent time stamps, and possibly also save a new Game.Modified timestamp to match the new final timestamp.