added first draft litris
This commit is contained in:
@@ -142,7 +142,7 @@ class Litris(GameBase):
|
|||||||
return
|
return
|
||||||
current_tetromino = Tetromino.create(current_letter)
|
current_tetromino = Tetromino.create(current_letter)
|
||||||
opt = Optimizer.get_optimal_drop(self.field, current_tetromino)
|
opt = Optimizer.get_optimal_drop(self.field, current_tetromino)
|
||||||
rotation = opt['tetromino_rotation']
|
rotation = 0 #opt['tetromino_rotation']
|
||||||
column = opt['tetromino_column']
|
column = opt['tetromino_column']
|
||||||
current_tetromino.rotate(rotation)
|
current_tetromino.rotate(rotation)
|
||||||
offset_col = current_tetromino.get_offset_column(rotation)
|
offset_col = current_tetromino.get_offset_column(rotation)
|
||||||
@@ -209,9 +209,9 @@ class Litris(GameBase):
|
|||||||
cv.waitKey(100)
|
cv.waitKey(100)
|
||||||
if self.overlay.run_mode == 'stopped' or self.overlay.run_mode == 'paused':
|
if self.overlay.run_mode == 'stopped' or self.overlay.run_mode == 'paused':
|
||||||
return
|
return
|
||||||
continue
|
|
||||||
self.keyboard.press(Key.down)
|
self.keyboard.press(Key.down)
|
||||||
self.keyboard.release(Key.down)
|
self.keyboard.release(Key.down)
|
||||||
|
continue
|
||||||
points = self.vision_stun.get_click_points(rectangles)
|
points = self.vision_stun.get_click_points(rectangles)
|
||||||
|
|
||||||
for point in points:
|
for point in points:
|
||||||
|
|||||||
Reference in New Issue
Block a user