Closed ichabod801 closed 4 years ago
I think the relevant bit of code is in the draw method:
# Check for empty deck.
if not self.deck.cards:
self.human.tell('The deck is empty.')
if self.empty_deck == 'score':
self.score()
if self.empty_deck != 'pass':
if max(self.scores.values()) < self.goal:
self.deal(self.empty_deck == 'reshuffle')
return self.empty_deck != 'score'
else:
return not self.draw_one
So if the deck is empty, draw_one is ignored. In that case the return value (which is the go value returned by player_action) is True if empty_deck is pass or reshuffle, to allow you to pass or continue drawing.
So the empty deck return needs to be anded with the not draw_one return.
I was playing Crazy Eights with the options draw=2 draw-one empty-deck=pass multi-score one-alert. This happened:
It seems to me that with draw-one the turn should pass whether or not the deck is empty. It was passing the turn otherwise.