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 games.monopoly.standalone_demo.PropertyColor¶
-
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 games.monopoly.standalone_demo.PropertyType¶
-
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.
- games.monopoly.standalone_demo.calculate_rent(property_obj, state, dice_roll=None)¶
Calculate rent for a property.
- games.monopoly.standalone_demo.create_board()¶
Create the initial board with all properties.
- games.monopoly.standalone_demo.create_players(player_names)¶
Create initial players.
- games.monopoly.standalone_demo.get_property_at_position(position)¶
Get property information at a board position.
- games.monopoly.standalone_demo.handle_property_landing(state, position)¶
Handle a player landing on a property.
- games.monopoly.standalone_demo.move_player(player, dice_roll)¶
Move a player based on dice roll.
- games.monopoly.standalone_demo.print_divider()¶
Print a divider line.
- games.monopoly.standalone_demo.print_player_status(state)¶
Print current status of all players.
- Parameters:
state (GameState)
- games.monopoly.standalone_demo.print_property(property_obj)¶
Print property details.
- Parameters:
property_obj (Property)
- games.monopoly.standalone_demo.print_recent_events(events, count=5)¶
Print recent game events.
- games.monopoly.standalone_demo.roll_dice()¶
Roll two dice.
- Return type:
DiceRoll