Leak resource
When I clicked the button of "How Do You Play?" and got the below error.
(base) D:\pose-game-python>python ./play.py Traceback (most recent call last): File "D:\Tools\Anaconda3\lib\tkinter_init_.py", line 1892, in call return self.func(*args) File "D:\pose-game-python\play.py", line 16, in img1 img1 = PhotoImage(file=os.path.join(imgs_path, 'no_move.gif')) # 再次创建图片:重命名图片 File "D:\Tools\Anaconda3\lib\tkinter_init_.py", line 4064, in init Image.init(self, 'photo', name, cnf, master, **kw) File "D:\Tools\Anaconda3\lib\tkinter_init_.py", line 4009, in init self.tk.call(('image', 'create', imgtype, name,) + options) tkinter.TclError: couldn't open "D:\pose-game-python\tutorial_poses\no_move.gif": no such file or directory Exception in Tkinter callback Traceback (most recent call last): File "D:\Tools\Anaconda3\lib\tkinter_init.py", line 1892, in call return self.func(*args) File "D:\pose-game-python\play.py", line 26, in img2 img2 = PhotoImage(file=os.path.join(imgs_path, 'hook.gif')) # 再次创建图片:重命名图片 File "D:\Tools\Anaconda3\lib\tkinter_init_.py", line 4064, in init Image.init(self, 'photo', name, cnf, master, **kw) File "D:\Tools\Anaconda3\lib\tkinter_init_.py", line 4009, in init self.tk.call(('image', 'create', imgtype, name,) + options) _tkinter.TclError: couldn't open "D:\pose-game-python\tutorial_poses\hook.gif": no such file or directory
And I think it's better to integrate the game together.