Fix day being off-by-one on turn zero.

Doesn't have any real effect since no mission can be generated for that
turn, but shows up wrong in the top bar.
This commit is contained in:
Dan Albert 2021-10-17 17:33:29 -07:00
parent fd49d213c2
commit b174e668f4

View File

@ -99,9 +99,7 @@ class Game:
self.settings = settings self.settings = settings
self.events: List[Event] = [] self.events: List[Event] = []
self.theater = theater self.theater = theater
# pass_turn() will be called when initialization is complete which will self.turn = 0
# increment this to turn 0 before it reaches the player.
self.turn = -1
# NB: This is the *start* date. It is never updated. # NB: This is the *start* date. It is never updated.
self.date = date(start_date.year, start_date.month, start_date.day) self.date = date(start_date.year, start_date.month, start_date.day)
self.game_stats = GameStats() self.game_stats = GameStats()
@ -303,7 +301,6 @@ class Game:
def begin_turn_0(self) -> None: def begin_turn_0(self) -> None:
"""Initialization for the first turn of the game.""" """Initialization for the first turn of the game."""
self.turn = 0
self.blue.preinit_turn_0() self.blue.preinit_turn_0()
self.red.preinit_turn_0() self.red.preinit_turn_0()
self.initialize_turn() self.initialize_turn()