From 832cc2d57d12f998464370b2b107ba93ab4d2ffe Mon Sep 17 00:00:00 2001 From: SamWqc <15911033077@163.com> Date: Wed, 16 Dec 2020 00:51:54 +0800 Subject: [PATCH] fix _setAction --- ple/games/base/pygamewrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ple/games/base/pygamewrapper.py b/ple/games/base/pygamewrapper.py index f76875a..0d984ba 100644 --- a/ple/games/base/pygamewrapper.py +++ b/ple/games/base/pygamewrapper.py @@ -69,7 +69,7 @@ def _setAction(self, action, last_action): if action is None: action = self.NOOP - if last_action is None: + if last_action is None or last_action==[]: last_action = self.NOOP kd = pygame.event.Event(KEYDOWN, {"key": action})