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_clue_game([debug, max_turns, delay])

Run a Clue game with rich UI visualization.

Module Contents¶

games.clue.example.run_clue_game(debug=False, max_turns=10, delay=1.0)¶

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:
  • debug (bool) – Enable debug mode with detailed logging

  • max_turns (int) – Maximum number of turns before the game ends

  • delay (float) – Delay between moves in seconds for better readability

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