Fix bug of quad with red and black joker

This commit is contained in:
Daochen Zha 2021-07-01 11:56:42 -05:00
parent fdbec432fa
commit 9178c89c05
1 changed files with 6 additions and 0 deletions

View File

@ -355,6 +355,12 @@ def _get_legal_card_play_actions(player_hand_cards, rival_move):
moves.sort()
moves = list(move for move, _ in itertools.groupby(moves))
# Remove Quad with black and red joker
for i in [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17]:
illegal_move = [i]*4 + [20, 30]
if illegal_move in moves:
moves.remove(illegal_move)
return moves