aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormryouse2021-06-13 01:55:35 +0000
committermryouse2021-06-13 01:55:35 +0000
commitdccfae58636fbbefe9102041b05e1d1d2a0aaa8d (patch)
treed3169c22571f594078c0fbd38ac1a0ae915c8123
parent0fd069b7a577651ce9fa7cbbc6b9ccb4d3c408ed (diff)
bugfix: 'new' and 'reset' after loss needs to have moves clearedHEADmaster
-rw-r--r--logic.py5
1 files changed, 4 insertions, 1 deletions
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()