From 9178c89c05ee0a01027ea28967b7f92c080eb4e4 Mon Sep 17 00:00:00 2001 From: Daochen Zha Date: Thu, 1 Jul 2021 11:56:42 -0500 Subject: [PATCH] Fix bug of quad with red and black joker --- pve_server/run_dmc.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pve_server/run_dmc.py b/pve_server/run_dmc.py index d3e32e9..e9ef4c8 100644 --- a/pve_server/run_dmc.py +++ b/pve_server/run_dmc.py @@ -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