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