haive.games.monopoly.game_agent¶
Fixed Monopoly game agent implementation.
This module provides the corrected main game agent for orchestrating a Monopoly game, with proper handling of BaseModel objects from LangGraph instead of dictionaries.
Classes¶
Main game agent for orchestrating Monopoly. |
|
Configuration for monopoly game agent. |
Module Contents¶
- class haive.games.monopoly.game_agent.MonopolyGameAgent(config)[source]¶
Bases:
haive.core.engine.agent.agent.Agent
[MonopolyGameAgentConfig
]Main game agent for orchestrating Monopoly.
Initialize the game agent.
- Parameters:
config (MonopolyGameAgentConfig)
- handle_jail_turn(state)[source]¶
Handle a turn when player is in jail.
- Parameters:
state (haive.games.monopoly.state.MonopolyState)
- Return type:
langgraph.types.Command
- handle_property_space(state, property_name)[source]¶
Handle landing on a property space.
- Parameters:
state (haive.games.monopoly.state.MonopolyState)
property_name (str)
- Return type:
langgraph.types.Command
- handle_special_space(state, space_name)[source]¶
Handle landing on special spaces like GO, Jail, etc.
- Parameters:
state (haive.games.monopoly.state.MonopolyState)
space_name (str)
- Return type:
langgraph.types.Command
- offer_property_purchase(state, property_obj)[source]¶
Offer property purchase to current player.
- Parameters:
state (haive.games.monopoly.state.MonopolyState)
- Return type:
langgraph.types.Command
- pay_rent(state, property_obj)[source]¶
Handle rent payment.
- Parameters:
state (haive.games.monopoly.state.MonopolyState)
- Return type:
langgraph.types.Command