games.monopoly.ui¶
Rich UI for displaying a live Monopoly game with proper error handling.
This module provides a beautiful terminal interface for watching Monopoly games unfold in real-time using Rich, with fixes for the validation error.
Classes¶
Beautiful Rich UI for displaying a live Monopoly game. |
Functions¶
|
Run a Monopoly game with the Rich UI. |
Module Contents¶
- class games.monopoly.ui.MonopolyRichUI¶
Beautiful Rich UI for displaying a live Monopoly game.
- render_board()¶
Render a simplified board view.
- Return type:
rich.panel.Panel
- render_current_player()¶
Render current player information.
- Return type:
rich.panel.Panel
Render the footer with controls and game info.
- Return type:
rich.panel.Panel
- render_header()¶
Render the game header.
- Return type:
rich.panel.Panel
- render_players()¶
Render all players summary.
- Return type:
rich.panel.Panel
- render_recent_events()¶
Render recent game events.
- Return type:
rich.panel.Panel
- run(agent, delay=2.0)¶
Run the live UI with the Monopoly agent.
- Parameters:
agent (haive.games.monopoly.main_agent.MonopolyAgent) – The Monopoly agent to run
delay (float) – Delay between updates for readability
- games.monopoly.ui.main()¶
Run a Monopoly game with the Rich UI.