File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,6 @@ class GameState:
152152 def __init__ (self ):
153153 global continuable
154154 if saveData .hasItem ('boardState' ) == False :
155-
156155 continuable = False
157156 else :
158157 continuable = True
@@ -180,6 +179,8 @@ def prepare(self):
180179 for j in self .field .field_range ():
181180 if jdata [i ][j ] >= 0 :
182181 self .field .restore_panel (j , i , jdata [i ][j ])
182+ if self .field .is_playable () == False :
183+ self .gameover = True ;
183184
184185
185186 self .idle = 0
@@ -249,7 +250,6 @@ def saveGameState(self):
249250 if self .field .panels [i ][j ]:
250251 mapData [i ][j ] = self .field .panels [i ][j ].value
251252 json_data = json .dumps (mapData )
252- print (json_data )
253253 saveData .setItem ('boardState' , json_data )
254254 saveData .save ()
255255
You can’t perform that action at this time.
0 commit comments