Skip to content

Commit

Permalink
Make pass always a legal move
Browse files Browse the repository at this point in the history
Currently goboard_fast does not allow a pass if the game is already
over. This change makes goboard_fast consistent with goboard_slow and
goboard.
  • Loading branch information
macfergus committed Dec 22, 2020
1 parent 55cd7ce commit 6148f57
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions code/dlgo/goboard_fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,6 @@ def is_over(self):
return self.last_move.is_pass and second_last_move.is_pass

def legal_moves(self):
if self.is_over():
return []
moves = []
for row in range(1, self.board.num_rows + 1):
for col in range(1, self.board.num_cols + 1):
Expand Down

1 comment on commit 6148f57

@Dirtyboy1029
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to work. Thanks

Please sign in to comment.