diff --git a/board.py b/board.py index 4807660..6da1629 100644 --- a/board.py +++ b/board.py @@ -34,6 +34,7 @@ class Board: self.mine_counter = self.game_font.render(str(mines), True, (255,0,0)) self.counter_loc = self.mine_counter.get_rect() self.counter_loc.bottomleft = self.square_grid.topleft + self.update_mine_counter() # Places the timer self.timer = self.game_font.render("999", True, (255,0,0)) @@ -185,3 +186,4 @@ class Board: self.total_flags += 1 elif square.is_questioned: self.total_flags -= 1 + self.update_mine_counter() diff --git a/main.py b/main.py index 42885e6..247fbad 100755 --- a/main.py +++ b/main.py @@ -29,7 +29,6 @@ def play_game(rows, cols, mines): pygame.time.set_timer(UPDATETIMER, 100) while True: - board.update_mine_counter() board.check_for_win() pygame.display.update()