Remove call to update_mine_counter() from the main loop

This commit is contained in:
filifa 2024-03-19 20:38:20 -05:00
parent 067a0d568c
commit 4e7d631e42
2 changed files with 2 additions and 1 deletions

View File

@ -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()

View File

@ -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()