def pass_cards_selected(game, cards_str, player, turn_id): '''Called when a player selects which cards to pass Arguments: game: the game database entry cards_str: a string shorthand representing which cards the player chose to pass player: the database entry for the player who is passing their cards turn_id: the id of the current turn ''' cards = Card.list_from_str_list(cards_str) pass_round.received_passed_cards(game, player, cards, turn_id)
def trick_cards_selected(game, cards_str, player, turn_id): '''Called when a player selects which card to play for the trick turn Arguments: game: the game database entry cards_str: a string shorthand representing which cards the player chose to pass player: the database entry for the player who is passing their cards turn_id: the id of the current turn ''' cards = Card.list_from_str_list(cards_str) # The assumption is that the player can only select one card on their turn # for the trick. card = cards[0] trick_turn.card_discarded(game, player, card, turn_id)