haive.games.monopoly.utils ========================== .. py:module:: haive.games.monopoly.utils .. autoapi-nested-parse:: Monopoly game utilities and board logic. This module provides utility functions for the monopoly game, including: - Board setup and property definitions - Game logic calculations - Card definitions and handling - Rent calculations Functions --------- .. autoapisummary:: haive.games.monopoly.utils.calculate_rent haive.games.monopoly.utils.can_trade_properties haive.games.monopoly.utils.check_game_end haive.games.monopoly.utils.create_board haive.games.monopoly.utils.create_players haive.games.monopoly.utils.get_building_cost haive.games.monopoly.utils.get_properties_by_color haive.games.monopoly.utils.get_property_at_position haive.games.monopoly.utils.handle_special_position haive.games.monopoly.utils.move_player haive.games.monopoly.utils.roll_dice haive.games.monopoly.utils.shuffle_cards Module Contents --------------- .. py:function:: calculate_rent(property, state, dice_roll = None) Calculate rent for a property. .. py:function:: can_trade_properties(prop1, prop2, state) Check if two properties can be traded. .. py:function:: check_game_end(state) Check if the game should end. .. py:function:: create_board() Create the initial board with all properties. .. py:function:: create_players(player_names) Create initial players. .. py:function:: get_building_cost(property, buildings, is_hotel = False) Calculate cost to build houses or hotel. .. py:function:: get_properties_by_color(color) Get all property names for a color group. .. py:function:: get_property_at_position(position) Get property information at a board position. .. py:function:: handle_special_position(position, player, state) Handle special board positions like GO, Jail, etc. .. py:function:: move_player(player, dice_roll) Move a player based on dice roll. .. py:function:: roll_dice() Roll two dice. .. py:function:: shuffle_cards() Shuffle and return chance and community chest cards.