Skip to content

Commit

Permalink
Update simpletetris.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yvandlo committed Dec 14, 2021
1 parent 2f97983 commit 31648b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/bot/simpletetris.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def get_successors(self, state, given=None):
else:
piece = given
successors = []
explored = set()
explored = {False}
for i in range(4):
xrange, yrange = piece.bound_ranges()
piece = piece.change_center((0 - xrange[0], 0 - yrange[1]))
Expand All @@ -198,7 +198,7 @@ def get_successors(self, state, given=None):
successors.append((newstate, (i, offset), self.reward(state, newstate)))
piece = piece.rotate_left()

return filter(lambda x: x[0] is not False, successors)
return successors

def is_goal(self, state):
return not state.contains("c")

0 comments on commit 31648b3

Please sign in to comment.