haive.games.clue.state_manager¶
State manager for the Clue game.
This module defines the state management for the Clue game, providing methods for game logic and state transitions.
Classes¶
Manager for Clue game state. |
Module Contents¶
- class haive.games.clue.state_manager.ClueStateManager[source]¶
Bases:
haive.games.framework.base.state_manager.GameStateManager
[haive.games.clue.state.ClueState
]Manager for Clue game state.
- classmethod add_analysis(state, player, hypothesis)[source]¶
Add a hypothesis to the state.
- Parameters:
state (haive.games.clue.state.ClueState) – Current game state
player (str) – Player performing the analysis
- Returns:
Updated state with added hypothesis
- Return type:
- classmethod apply_move(state, move)[source]¶
Apply a guess to the current state.
- Parameters:
state (haive.games.clue.state.ClueState) – Current game state
move (haive.games.clue.models.ClueGuess) – The guess to apply
- Returns:
Updated game state
- Return type:
- classmethod check_game_status(state)[source]¶
Check and potentially update game status.
- Parameters:
state (haive.games.clue.state.ClueState) – Current game state
- Returns:
Updated game state
- Return type:
- classmethod get_legal_moves(state)[source]¶
Get all legal moves for the current state.
- Parameters:
state (haive.games.clue.state.ClueState) – The current game state
- Returns:
List of possible legal guesses
- Return type:
- classmethod get_possible_solutions(state)[source]¶
Get possible solutions based on the current game state.
- classmethod get_winner(state)[source]¶
Get the winner of the game.
- Parameters:
state (haive.games.clue.state.ClueState) – Current game state
- Returns:
Winner of the game, or None if ongoing
- Return type:
str | None