gym_splendor_code/envs/mechanics/board.py
def from_dict(self, vector):
        """Take player's gems from the board. """

        gems = vector['board']['gems_on_board']
        self.gems_on_board = GemsCollection({GemColor.GOLD: gems[0], GemColor.RED: gems[1],GemColor.GREEN: gems[2], GemColor.BLUE: gems[3],
                        GemColor.WHITE: gems[4], GemColor.BLACK: gems[5]})

        """Puts cards on the board according to previous current_state. """
        cards = vector['board']['cards_on_board']
        drawn_cards = map(lambda x: self.deck.pop_cards_from_id_list(cards, x), self.deck.decks_dict.keys())
        self.cards_on_board = set(reduce(lambda x, y: x + y, drawn_cards))
Take player's gems from the board. 
Take player's gems from the board.
Take player ' s gems from the board .
def from_dict(self, vector):
        gems = vector['board']['gems_on_board']
        self.gems_on_board = GemsCollection({GemColor.GOLD: gems[0], GemColor.RED: gems[1],GemColor.GREEN: gems[2], GemColor.BLUE: gems[3],
                        GemColor.WHITE: gems[4], GemColor.BLACK: gems[5]})
        cards = vector['board']['cards_on_board']
        drawn_cards = map(lambda x: self.deck.pop_cards_from_id_list(cards, x), self.deck.decks_dict.keys())
        self.cards_on_board = set(reduce(lambda x, y: x + y, drawn_cards))
def from_dict ( self , vector ) : gems = vector [ 'board' ] [ 'gems_on_board' ] self . gems_on_board = GemsCollection ( { GemColor . GOLD : gems [ 0 ] , GemColor . RED : gems [ 1 ] , GemColor . GREEN : gems [ 2 ] , GemColor . BLUE : gems [ 3 ] , GemColor . WHITE : gems [ 4 ] , GemColor . BLACK : gems [ 5 ] } ) """Puts cards on the board according to previous current_state. """ cards = vector [ 'board' ] [ 'cards_on_board' ] drawn_cards = map ( lambda x : self . deck . pop_cards_from_id_list ( cards , x ) , self . deck . decks_dict . keys ( ) ) self . cards_on_board = set ( reduce ( lambda x , y : x + y , drawn_cards ) )
Take player's gems from the board.
Take player ' s gems from the board .
"""Take player's gems from the board. """ """Puts cards on the board according to previous current_state. """
self
vector