Skip to content

Commit 22efdc4

Browse files
committed
fix:回放时小黄脸不动
1 parent d568176 commit 22efdc4

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

src/mineSweeperGUI.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,11 @@ def video_playing_step(self):
14921492
self.timer_video.stop()
14931493
self.video_playing = False
14941494
self.label.update()
1495+
# 回放时修改小黄脸
1496+
if self.label.ms_board.mouse_state in {1, 3, 7}:
1497+
self.set_face(14)
1498+
else:
1499+
self.set_face(15)
14951500
self.score_board_manager.show(self.label.ms_board, index_type=3)
14961501
self.video_time += self.video_time_step
14971502
self.showTime(int(self.video_time))

src/safe_eval.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,28 @@
206206
"END_FOR",
207207
"BUILD_STRING",
208208
"INTERPRETER_EXIT",
209+
"UNPACK_SEQUENCE",
210+
"COPY",
211+
"END_SEND",
212+
"COMPARE_OP",
213+
'BUILD_TUPLE',
214+
'BUILD_LIST',
215+
'BUILD_SET',
216+
'BUILD_MAP',
217+
'BUILD_CONST_KEY_MAP',
218+
'GET_ITER',
219+
'LOAD_FAST_AND_CLEAR',
220+
'FOR_ITER',
221+
'STORE_FAST',
222+
'LIST_APPEND',
223+
'NOP',
224+
'SWAP',
225+
'RERAISE',
226+
'UNARY_NOT',
227+
'<13>',
228+
'STORE_SLICE',
229+
'SET_ADD',
230+
'BINARY_SUBSCR',
209231
}
210232

211233
else:
@@ -289,9 +311,16 @@ def safe_eval(source, globals=None):
289311
"right": 8888,
290312
"right_s": 11.9
291313
}
292-
a = safe_eval("any([min(22+2, 6), 7])", constraints)
314+
a = safe_eval("all([any([min(22+2, 6), 7]), 5, -4])", constraints)
293315
a = safe_eval("f'{right}@{right_s:.3f}'", constraints)
294316
a = safe_eval("sin(22+2) / cos(-50) - (log(7.21))", constraints)
317+
a = safe_eval("bbbv >=4 and right < 5 or right_s == 2.3", constraints)
318+
a = safe_eval("[min(22+2, 6), 7][1]", constraints)
319+
a = safe_eval("{'a':right_s, 'ee':bbbv/right}['ee']", constraints)
320+
a = safe_eval("[i**1.2 for i in [bbbv, right]]", constraints)
321+
a = safe_eval("[log(i) * sin(cos(i)) for i in [bbbv, right]][bbbv-67]", constraints)
322+
a = safe_eval("{i for i in (5,1,sin(cos(88)))}", constraints)
323+
295324

296325

297326

0 commit comments

Comments
 (0)