Bank

class src.bank.Bank[source]

Bank class that controls behaviour of the bank in the game

Parameters:
  • resources (list) – bank’s resources

  • trade_ratios – standard ratio for all players

trading with the bank, 4 of the same card for one from the bank :type trade_ratios: int :param dev_cards: list of development cards in the bank’s inventory :type dev_cards: list

buy_from_bank(player, offered_resources, resource)[source]

purchases a resource from the bank

Trades the offered resources for the resource

Returns:

True if bank or player has required num of resources, else False

Return type:

boolean

null_method()[source]

Returns all current information about the bank

Returns:

The current values of the bank’s ‘resources’,

‘trade_ratios’ and ‘dev_cards’ inventory :rtype: Union[List[str],int]