added async stone detection thread
This commit is contained in:
4
field.py
4
field.py
@@ -5,7 +5,7 @@ from tetromino import Tetromino
|
|||||||
class Field():
|
class Field():
|
||||||
|
|
||||||
WIDTH = 20
|
WIDTH = 20
|
||||||
HEIGHT = 20
|
HEIGHT = 10
|
||||||
|
|
||||||
def __init__(self, state=None):
|
def __init__(self, state=None):
|
||||||
if state:
|
if state:
|
||||||
@@ -160,8 +160,6 @@ class Field():
|
|||||||
"""
|
"""
|
||||||
for i, row in enumerate(self.state):
|
for i, row in enumerate(self.state):
|
||||||
if ''.join(row).strip():
|
if ''.join(row).strip():
|
||||||
if (Field.HEIGHT - i) <= 10:
|
|
||||||
continue
|
|
||||||
return Field.HEIGHT - i
|
return Field.HEIGHT - i
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user