haive.games.single_player.flow_free.state_manager ================================================= .. py:module:: haive.games.single_player.flow_free.state_manager .. autoapi-nested-parse:: State manager for Flow Free game logic and mechanics. This module handles game initialization, move validation, and state transitions for the Flow Free puzzle game. Classes ------- .. autoapisummary:: haive.games.single_player.flow_free.state_manager.FlowFreeStateManager Module Contents --------------- .. py:class:: FlowFreeStateManager Bases: :py:obj:`haive.games.single_player.base.SinglePlayerStateManager`\ [\ :py:obj:`haive.games.single_player.flow_free.state.FlowFreeState`\ ] Manager for Flow Free game state. .. py:method:: apply_move(state, move) :classmethod: Apply a move to the current state. :param state: Current game state. :param move: Move to apply. :returns: Updated game state. :raises ValueError: If the move is invalid. .. py:method:: check_game_status(state) :classmethod: Check and update the game status. :param state: Current game state. :returns: Updated game state with status checked. .. py:method:: generate_hint(state) :classmethod: Generate a hint for the current game state. :param state: Current game state. :returns: Tuple of (updated state, hint text). .. py:method:: get_legal_moves(state) :classmethod: Get all legal moves for the current state. :param state: Current game state. :returns: List of all legal moves. .. py:method:: initialize(difficulty = GameDifficulty.MEDIUM, player_type = PlayerType.LLM, rows = 5, cols = 5, num_flows = None, **kwargs) :classmethod: Initialize a new Flow Free game state. :param difficulty: Difficulty level of the game. :param player_type: Type of player. :param rows: Number of rows in the grid. :param cols: Number of columns in the grid. :param num_flows: Number of flows to include. If None, determined by difficulty. :param \*\*kwargs: Additional initialization parameters. :returns: A new Flow Free game state. .. py:method:: interactive_input(state, user_input) :classmethod: Process interactive input from the player. :param state: Current game state. :param user_input: User input string. :returns: Updated game state.