correct display of turn statistics

This commit is contained in:
RndName
2021-07-06 11:42:44 +02:00
committed by Dan Albert
parent 2926431dc7
commit e88dfc53c2
3 changed files with 5 additions and 1 deletions

View File

@@ -109,7 +109,6 @@ class Game:
# NB: This is the *start* date. It is never updated.
self.date = date(start_date.year, start_date.month, start_date.day)
self.game_stats = GameStats()
self.game_stats.update(self)
self.notes = ""
self.ground_planners: dict[int, GroundPlanner] = {}
self.informations = []

View File

@@ -43,6 +43,10 @@ class GameStats:
:param game: Game we want to save the data about
"""
# Remove the current turn if its just an update for this turn
if 0 < game.turn < len(self.data_per_turn):
del self.data_per_turn[-1]
turn_data = GameTurnMetadata()
for cp in game.theater.controlpoints: