games.clue.controller¶
Controller for the Clue game.
This module provides the game controller that manages the state and flow of the Clue game.
Classes¶
Controller for the Clue game. |
|
Represents the state of a Clue game. |
|
Represents a player in the Clue game. |
Module Contents¶
- class games.clue.controller.ClueGameController(player_names, max_turns=20)¶
Controller for the Clue game.
Initialize a new Clue game.
- Parameters:
- async generate_ai_analysis(player_idx)¶
Generate an analysis using the player’s AI analysis engine.
- Parameters:
player_idx (int) – Index of the AI player
- Returns:
The generated analysis
- Return type:
- async generate_ai_guess(player_idx)¶
Generate a guess using the player’s AI engine.
- Parameters:
player_idx (int) – Index of the AI player
- Returns:
The generated guess
- Return type:
- get_game_state()¶
Get the current game state.
- Return type:
- get_player_view(player_idx)¶
Get the game state from a specific player’s point of view.
- make_guess(player_idx, guess)¶
Process a player’s guess and return the response.
- Parameters:
player_idx (int) – Index of the player making the guess
guess (haive.games.clue.models.ClueGuess) – The guess made by the player
- Returns:
A response indicating whether the guess was correct or which player refuted it
- Return type:
- class games.clue.controller.ClueGameState¶
Represents the state of a Clue game.
- class games.clue.controller.CluePlayer¶
Represents a player in the Clue game.