diff --git a/ttrs.py b/ttrs.py index ca7cb3d..1d8c738 100755 --- a/ttrs.py +++ b/ttrs.py @@ -301,6 +301,7 @@ class TtrsGame(threading.Thread): lastfall = 0 lastmove = 0 dropping = False + top_row = { Point(x, -1) for x in range(self.playground.height) } while self.running: self.__call_callbacks() time.sleep(TICK_TIME) @@ -311,6 +312,10 @@ class TtrsGame(threading.Thread): self.running = False break + if not self.playground.block_points.isdisjoint(top_row): + self.running = False + break + if mino is None: newminocls = self.rnd.choice(Tetrimino.__subclasses__()) mino = newminocls(self.playground, spawnpos)