"""Run a Monopoly game with the fixed UI.This script demonstrates how to run a Monopoly game with the fixed UI."""importloggingfromhaive.games.monopoly.configimportMonopolyGameAgentConfigfromhaive.games.monopoly.main_agentimportMonopolyAgentfromhaive.games.monopoly.ui_fixedimportMonopolyRichUI# Configure logginglogging.basicConfig(level=logging.INFO)logger=logging.getLogger(__name__)
[docs]defmain():"""Run a Monopoly game with the fixed UI."""logger.info("Starting Monopoly game...")# Create configuration with more explicit settingsconfig=MonopolyGameAgentConfig(name="monopoly_demo",player_names=["Alice","Bob","Charlie","Diana"],max_turns=50,# Shorter for testingenable_trading=False,enable_building=False,enable_auctions=False,# Set higher recursion limit to avoid errorsrunnable_config={"configurable":{"recursion_limit":500,"thread_id":"monopoly_game_demo"}},)# Create the agentagent=MonopolyAgent(config)# Create the UI and run the gameui=MonopolyRichUI()ui.run(agent,delay=1.0)