added async stone detection thread

This commit is contained in:
2023-07-26 08:43:30 +02:00
parent e0a9cbc394
commit 3d2ce694e1
2 changed files with 6 additions and 2 deletions

View File

@@ -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')