aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsweepy.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/sweepy.py b/sweepy.py
index bc173f5..0a3f635 100755
--- a/sweepy.py
+++ b/sweepy.py
@@ -38,6 +38,9 @@ def env_setup():
def game_loop(stdscr, ob, ml):
+ game_width = ml.WIDTH
+ game_height = ml.HEIGHT
+ game_bombs = ml.BOMBS
cur_y, cur_x = ml.get_first_cell()
while(True):
@@ -66,14 +69,14 @@ def game_loop(stdscr, ob, ml):
stdscr.clrtoeol()
ml = MinesweeperLogic()
- ml.new_game()
+ ml.new_game(game_width, game_height, game_bombs)
cur_y, cur_x = ml.get_first_cell()
break
elif ik == 'r':
stdscr.move(4, 3)
stdscr.clrtoeol()
- ml.new_game()
+ ml.new_game(game_width, game_height, game_bombs)
cur_y, cur_x = ml.get_first_cell()
break
@@ -119,7 +122,7 @@ def game_loop(stdscr, ob, ml):
if choice == 'y':
ml = MinesweeperLogic()
- ml.new_game()
+ ml.new_game(game_width, game_height, game_bombs)
cur_y, cur_x = ml.get_first_cell()
# reset the current game with the "r" key
@@ -131,7 +134,7 @@ def game_loop(stdscr, ob, ml):
stdscr.clrtoeol()
if choice == 'y':
- ml.new_game()
+ ml.new_game(game_width, game_height, game_bombs)
cur_y, cur_x = ml.get_first_cell()
# quit without saving using the "q" key