Fix game end
This commit is contained in:
@@ -119,6 +119,9 @@ class Minesweeper:
|
|||||||
unrevealed = 0
|
unrevealed = 0
|
||||||
for row in self.board_progress:
|
for row in self.board_progress:
|
||||||
for cell in row:
|
for cell in row:
|
||||||
|
if cell == -1:
|
||||||
|
return False
|
||||||
|
|
||||||
if cell == "-":
|
if cell == "-":
|
||||||
unrevealed += 1
|
unrevealed += 1
|
||||||
if (unrevealed - self.mines) == 0:
|
if (unrevealed - self.mines) == 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user