From f62fa39e6979dfbca5e416ffb906914c7e27505b Mon Sep 17 00:00:00 2001 From: Frederic Date: Tue, 27 Dec 2016 13:40:04 +0100 Subject: [PATCH] added three seconds delay before terminating game when player steps down --- ttrs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ttrs.py b/ttrs.py index 3eed636..60da945 100755 --- a/ttrs.py +++ b/ttrs.py @@ -352,8 +352,10 @@ class TtrsGame(threading.Thread): evt = self.player.get_event() if evt == PlayerEvent.QUIT: - self.running = False - break + time.sleep(3) + if self.player.get_event() == PlayerEvent.QUIT: + self.running = False + break if not self.playground.block_points.isdisjoint(top_row): self.running = False