bot/boggle.py
def is_on_board_helper(self, word, row, column):
        """
        Determines if a given word can be formed on the word
        :param word: a word asa string
        :param row: row at which the previous letter was
        :param column: column at which the previous letter was
        :return: returns true if the given word could be found on the board
        """
        if not word:
            return True
        else:
            for i in range(row-1,row+2):
                for n in range(column-1,column+2):
                    in_bounds = (i > -1) and (n > -1) and (i < BOARD_SIZE) and (n < BOARD_SIZE)
                    if in_bounds and word[0].lower() == self.board[i][n].lower() and not self.visited[i][n]:
                        self.visited[i][n] = True
                        is_on_board = self.is_on_board_helper(word[1:], i, n)
                        self.visited[i][n] = False

                        if is_on_board:
                            return True
            return False

        Determines if a given word can be formed on the word
        :param word: a word asa string
        :param row: row at which the previous letter was
        :param column: column at which the previous letter was
        :return: returns true if the given word could be found on the board
        
Determines if a given word can be formed on the word
Determines if a given word can be formed on the word
def is_on_board_helper(self, word, row, column):
        if not word:
            return True
        else:
            for i in range(row-1,row+2):
                for n in range(column-1,column+2):
                    in_bounds = (i > -1) and (n > -1) and (i < BOARD_SIZE) and (n < BOARD_SIZE)
                    if in_bounds and word[0].lower() == self.board[i][n].lower() and not self.visited[i][n]:
                        self.visited[i][n] = True
                        is_on_board = self.is_on_board_helper(word[1:], i, n)
                        self.visited[i][n] = False
                        if is_on_board:
                            return True
            return False
def is_on_board_helper ( self , word , row , column ) : if not word : return True else : for i in range ( row - 1 , row + 2 ) : for n in range ( column - 1 , column + 2 ) : in_bounds = ( i > - 1 ) and ( n > - 1 ) and ( i < BOARD_SIZE ) and ( n < BOARD_SIZE ) if in_bounds and word [ 0 ] . lower ( ) == self . board [ i ] [ n ] . lower ( ) and not self . visited [ i ] [ n ] : self . visited [ i ] [ n ] = True is_on_board = self . is_on_board_helper ( word [ 1 : ] , i , n ) self . visited [ i ] [ n ] = False if is_on_board : return True return False
Determines if a given word can be formed on the word
Determines if a given word can be formed on the word
"""
        Determines if a given word can be formed on the word
        :param word: a word asa string
        :param row: row at which the previous letter was
        :param column: column at which the previous letter was
        :return: returns true if the given word could be found on the board
        """
returns true if the given word could be found on the board
returns true if the given word could be found on the board
self
word
a word asa string
a word asa string
row
row at which the previous letter was
row at which the previous letter was
column
column at which the previous letter was
column at which the previous letter was