def is_simulation_complete(state: tuple) -> bool:
    """Check if simulation has reached end state.

        Args:
            state (tuple): The current simulation state.

        Returns:
            bool: True if simulation is complete, False otherwise
        """
    hallway, rooms = state
    for target_crab, room in rooms.items():
        for position in range(len(room)):
            if room[position] != target_crab:
                return False
    return True