haive.games.monopoly.standalone_demo¶
Standalone Monopoly demo with minimal dependencies.
This script provides a self-contained demonstration of the Monopoly game without relying on external dependencies like langchain.
- Usage:
python standalone_demo.py
Classes¶
str(object='') -> str |
|
str(object='') -> str |
Functions¶
|
Calculate rent for a property. |
Create the initial board with all properties. |
|
|
Create initial players. |
|
Get property information at a board position. |
|
Handle a player landing on a property. |
|
Move a player based on dice roll. |
Print a divider line. |
|
|
Print current status of all players. |
|
Print property details. |
|
Print recent game events. |
Roll two dice. |
|
|
Run a simple Monopoly game demo. |
Module Contents¶
- class haive.games.monopoly.standalone_demo.PropertyColor[source]¶
-
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
Initialize self. See help(type(self)) for accurate signature.
- class haive.games.monopoly.standalone_demo.PropertyType[source]¶
-
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
Initialize self. See help(type(self)) for accurate signature.
- haive.games.monopoly.standalone_demo.calculate_rent(property_obj, state, dice_roll=None)[source]¶
Calculate rent for a property.
- haive.games.monopoly.standalone_demo.create_board()[source]¶
Create the initial board with all properties.
- haive.games.monopoly.standalone_demo.get_property_at_position(position)[source]¶
Get property information at a board position.
- haive.games.monopoly.standalone_demo.handle_property_landing(state, position)[source]¶
Handle a player landing on a property.
- haive.games.monopoly.standalone_demo.move_player(player, dice_roll)[source]¶
Move a player based on dice roll.
- haive.games.monopoly.standalone_demo.print_player_status(state)[source]¶
Print current status of all players.
- Parameters:
state (GameState)
- haive.games.monopoly.standalone_demo.print_property(property_obj)[source]¶
Print property details.
- Parameters:
property_obj (Property)