From dccfae58636fbbefe9102041b05e1d1d2a0aaa8d Mon Sep 17 00:00:00 2001 From: mryouse Date: Sun, 13 Jun 2021 01:55:35 +0000 Subject: bugfix: 'new' and 'reset' after loss needs to have moves cleared --- logic.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/logic.py b/logic.py index 01956ee..4739f8c 100644 --- a/logic.py +++ b/logic.py @@ -39,7 +39,9 @@ class MinesweeperLogic: HEIGHT = 0 BOMBS = 0 SEED = 0 - MOVES = [] + + def __init__(self): + self.MOVES = [] def do_all_moves(self): for move in self.MOVES: @@ -106,6 +108,7 @@ class MinesweeperLogic: self.WIDTH = width self.HEIGHT = height self.BOMBS = bombs + self.MOVES = [] self.setup() self.do_first_move() -- cgit v1.2.3