added async stone detection thread
This commit is contained in:
6
field.py
6
field.py
@@ -5,7 +5,7 @@ from tetromino import Tetromino
|
||||
class Field():
|
||||
|
||||
WIDTH = 20
|
||||
HEIGHT = 10
|
||||
HEIGHT = 20
|
||||
|
||||
def __init__(self, state=None):
|
||||
if state:
|
||||
@@ -52,6 +52,10 @@ class Field():
|
||||
self.state = [[' ' for cols in range(Field.WIDTH)]
|
||||
for rows in range(Field.HEIGHT)]
|
||||
|
||||
def reset_half_field(self):
|
||||
self.state = [[' ' for cols in range(Field.WIDTH)]
|
||||
for rows in range(int(Field.HEIGHT/2))]
|
||||
|
||||
def rotate_state(self):
|
||||
self.state = self.rotate_90_degree_anticlckwise(self.state)
|
||||
#self.state = self.matrixflip(self.state, 'v')
|
||||
|
||||
Reference in New Issue
Block a user