forked from Hanabi/hanabi-league
correctly detect bottom deck situations
This commit is contained in:
parent
7a1adfa178
commit
542d40282a
1 changed files with 4 additions and 0 deletions
|
@ -49,9 +49,13 @@ def analyze_replay(instance: hanab_game.HanabiInstance, actions: List[hanab_game
|
|||
elif card.rank != 1:
|
||||
if card in game.deck[game.progress:]:
|
||||
bdrs.append((card, game.draw_pile_size))
|
||||
if card == game.deck[-1]:
|
||||
outcomes.add(GameOutcome.bottom_deck)
|
||||
else:
|
||||
if game.deck[game.progress:].count(card) == 2:
|
||||
bdrs.append((card, game.draw_pile_size))
|
||||
if card == game.deck[-1]:
|
||||
outcomes.add(GameOutcome.bottom_deck)
|
||||
|
||||
for action in actions:
|
||||
if action.type == hanab_game.ActionType.Discard:
|
||||
|
|
Loading…
Reference in a new issue