def _get_legal_actions(self):
        ''' Get all legal actions for current state

        Returns:
        if type(legal_actions[0]) == Card:
            print("GET:", [c.get_str() for c in legal_actions])
        else:
            print(legal_actions)
            legal_actions (list): a list of legal actions' id
        '''
        legal_action_id = {}
        legal_actions = self.game.get_legal_actions(self.game.get_state(self.game.round.current_player))
        if legal_actions:
            for action in legal_actions:
                if isinstance(action, Card):
                    action = action.get_str()
                action_id = self.action_id[action]
                legal_action_id[action_id] = None
        else:
            print("##########################")
            print("No Legal Actions")
            print(self.game.judger.judge_game(self.game))
            print(self.game.is_over())
            print([len(p.pile) for p in self.game.players])
            #print(self.game.get_state(self.game.round.current_player))
            #exit()
        return OrderedDict(legal_action_id)
 Get all legal actions for current state

        Returns:
        if type(legal_actions[0]) == Card:
            print("GET:", [c.get_str() for c in legal_actions])
        else:
            print(legal_actions)
            legal_actions (list): a list of legal actions' id
        
rlcard/envs/mahjong.py