old_version/solver.py
def divide_positions_by_squares(self, available_positions: List[Tuple[int, int]], digit: int) -> Dict[
        int, List[int]]:
        """
        Creates a dictionary with square numbers as keys and list of black cells' coordinates,
         where number can be inserted.
        :param available_positions:
        :param digit: number we are evaluating
        :return: dictionary with blank cells' coordinates divided by square numbers
        """
        positions_in_squares = {}
        for element in available_positions:
            square_number = self.find_square(element[0], element[1])
            if self.digit_in_square(digit, square_number):
                continue
            if square_number not in positions_in_squares:
                positions_in_squares[square_number] = []
            positions_in_squares[square_number].append(element)
        return positions_in_squares

        Creates a dictionary with square numbers as keys and list of black cells' coordinates,
         where number can be inserted.
        :param available_positions:
        :param digit: number we are evaluating
        :return: dictionary with blank cells' coordinates divided by square numbers
        
Creates a dictionary with square numbers as keys and list of black cells' coordinates,
where number can be inserted.
Creates a dictionary with square numbers as keys and list of black cells ' coordinates where number can be inserted .
def divide_positions_by_squares(self, available_positions: List[Tuple[int, int]], digit: int) -> Dict[
        int, List[int]]:
        positions_in_squares = {}
        for element in available_positions:
            square_number = self.find_square(element[0], element[1])
            if self.digit_in_square(digit, square_number):
                continue
            if square_number not in positions_in_squares:
                positions_in_squares[square_number] = []
            positions_in_squares[square_number].append(element)
        return positions_in_squares
def divide_positions_by_squares ( self , available_positions : List [ Tuple [ int , int ] ] , digit : int ) -> Dict [ int , List [ int ] ] : positions_in_squares = { } for element in available_positions : square_number = self . find_square ( element [ 0 ] , element [ 1 ] ) if self . digit_in_square ( digit , square_number ) : continue if square_number not in positions_in_squares : positions_in_squares [ square_number ] = [ ] positions_in_squares [ square_number ] . append ( element ) return positions_in_squares
Creates a dictionary with square numbers as keys and list of black cells' coordinates,
where number can be inserted.
Creates a dictionary with square numbers as keys and list of black cells ' coordinates where number can be inserted .
"""
        Creates a dictionary with square numbers as keys and list of black cells' coordinates,
         where number can be inserted.
        :param available_positions:
        :param digit: number we are evaluating
        :return: dictionary with blank cells' coordinates divided by square numbers
        """
dictionary with blank cells' coordinates divided by square numbers
dictionary with blank cells ' coordinates divided by square numbers
self
available_positions
List[Tuple[int, int]]
None
digit
int
number we are evaluating
number we are evaluating