fix bug: count bdrs if bombed

This commit is contained in:
Maximilian Keßler 2023-11-11 03:47:38 +01:00
parent afad8ca4fa
commit 7364789f11
Signed by: max
GPG key ID: BCC5A619923C0BA5

2
bdr.py
View file

@ -9,7 +9,7 @@ def analyze_game(instance: HanabLiveInstance, actions: List[Action]) -> Tuple[Li
termination = '' termination = ''
game = HanabLiveGameState(instance) game = HanabLiveGameState(instance)
for action in actions: for action in actions:
if action.type == ActionType.Discard: if action.type == ActionType.Discard or (action.type == ActionType.Play and not game.is_playable(instance.deck[action.target])):
discard = instance.deck[action.target] discard = instance.deck[action.target]
if not game.is_trash(discard): if not game.is_trash(discard):
if game.is_critical(discard): if game.is_critical(discard):