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¶

ClueGameController

Controller for the Clue game.

ClueGameState

Represents the state of a Clue game.

CluePlayer

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:
  • player_names (list[str]) – Names of the players

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

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:

haive.games.clue.models.ClueHypothesis

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:

haive.games.clue.models.ClueGuess

generate_board_string()¶

Generate a string representation of the game board.

Return type:

str

get_game_state()¶

Get the current game state.

Return type:

ClueGameState

get_player_view(player_idx)¶

Get the game state from a specific player’s point of view.

Parameters:

player_idx (int) – Index of the player

Returns:

A dictionary with the game state visible to the player

Return type:

dict

make_guess(player_idx, guess)¶

Process a player’s guess and return the response.

Parameters:
Returns:

A response indicating whether the guess was correct or which player refuted it

Return type:

haive.games.clue.models.ClueResponse

class games.clue.controller.ClueGameState¶

Represents the state of a Clue game.

class games.clue.controller.CluePlayer¶

Represents a player in the Clue game.