flappy init

This commit is contained in:
2023-07-29 19:34:12 +02:00
parent c7dd04590a
commit 2fa0255761

View File

@@ -154,6 +154,8 @@ class Field():
def predict_gaps_in_next_rotation(self):
tmp_state = copy(self.state)
tmp_state = self.rotate_90_degree_anticlckwise(tmp_state)
if tmp_state[9][0] is not ' ' and tmp_state[9][1] is not ' ':
return 10
for row in range(int(self.HEIGHT/2)):
tmp_state[row] = [' ' for cols in range(Field.WIDTH)]
return sum(