haive.games.fox_and_geese.ui¶
Rich UI module for Fox and Geese game visualization.
This module provides rich console UI components for visualizing the Fox and Geese game.
Classes¶
Rich UI for Fox and Geese game visualization. |
Module Contents¶
- class haive.games.fox_and_geese.ui.FoxAndGeeseUI(console=None)[source]¶
Rich UI for Fox and Geese game visualization.
Initialize the UI.
- Parameters:
console (rich.console.Console | None) – Optional Rich console instance
- create_analysis_panel(game_state)[source]¶
Create a panel showing the latest analysis.
- Parameters:
game_state (haive.games.fox_and_geese.state.FoxAndGeeseState) – Current game state
- Returns:
Rich panel with analysis info
- Return type:
rich.panel.Panel
- create_board_table(game_state)[source]¶
Create a rich visual representation of the board.
- Parameters:
game_state (haive.games.fox_and_geese.state.FoxAndGeeseState) – Current game state
- Returns:
Rich table representing the board
- Return type:
rich.table.Table
- create_game_info_panel(game_state)[source]¶
Create a panel with game information.
- Parameters:
game_state (haive.games.fox_and_geese.state.FoxAndGeeseState) – Current game state
- Returns:
Rich panel with game info
- Return type:
rich.panel.Panel
- create_last_move_panel(game_state)[source]¶
Create a panel showing the last move.
- Parameters:
game_state (haive.games.fox_and_geese.state.FoxAndGeeseState) – Current game state
- Returns:
Rich panel with last move info
- Return type:
rich.panel.Panel
- create_layout(game_state)[source]¶
Create the complete rich UI layout.
- Parameters:
game_state (haive.games.fox_and_geese.state.FoxAndGeeseState) – Current game state
- Returns:
Complete rich layout
- Return type:
rich.layout.Layout
- display_final_results(final_state)[source]¶
Display final game results.
- Parameters:
final_state (Any) – Final game state
- Return type:
None
- display_state(state_data)[source]¶
Display the game state using rich UI.
- Parameters:
state_data (Any) – State data in various formats
- Returns:
True if display was successful, False otherwise
- Return type: