Skip to content

Commit 93cc791

Browse files
committed
fix gin rummy error
Former-commit-id: a0f28b0
1 parent 5f6d0e2 commit 93cc791

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rlcard/models/gin_rummy_rule_models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
'''
88

99
from typing import TYPE_CHECKING
10+
from collections import OrderedDict
11+
1012
if TYPE_CHECKING:
1113
from rlcard.core import Card
1214

@@ -69,7 +71,7 @@ def step(state):
6971
state=state)
7072
if best_discards:
7173
actions = [DiscardAction(card=card).action_id for card in best_discards]
72-
if type(actions) == dict:
74+
if type(actions) == OrderedDict:
7375
actions = list(actions.keys())
7476
return np.random.choice(actions)
7577

0 commit comments

Comments
 (0)