haive.games.clue.example¶
Clue example module.
This module provides an example of running a Clue game with the rich UI visualization.
- It demonstrates how to:
Configure and initialize the Clue game
Set up the game state
Visualize the game with the rich UI
Process game turns with guesses and responses
Handle game over conditions
The module uses a standard CLI interface with argument parsing to allow customization of game behavior.
Example
- Run this script directly to start a Clue game:
python -m haive.games.clue.example
- Command-line options:
–debug: Enable debug mode with detailed logging –turns: Set maximum number of turns (default: 10) –delay: Set delay between moves in seconds (default: 1.0)
Functions¶
|
Run a Clue game with rich UI visualization. |
Module Contents¶
- haive.games.clue.example.run_clue_game(debug=False, max_turns=10, delay=1.0)[source]¶
Run a Clue game with rich UI visualization.
This function sets up and runs a Clue game with test moves (for demonstration) with rich terminal visualization. It handles a simplified game flow with a few predetermined moves for UI testing.
- Parameters:
- Returns:
None
Example
>>> run_clue_game(debug=True, max_turns=5, delay=0.5) # Runs a test game with debug logging, 5 max turns, and 0.5s delay