def flood_fill(self, x, y):
    if ((self.board_data[y][x] == ' ◌ ') and (self.mine_board[y][x] == '◉')):
        raise Exception("the flood fill algo hit a mine, but it shouldn't because it will stop when it hits a number.")
    elif ((self.board_data[y][x] == ' ◌ ') and (self.mine_board[y][x] > 0)):
        self.board_data[y][x] = ((' ' + str(self.mine_board[y][x])) + ' ')
    elif ((self.board_data[y][x] == ' ◌ ') and (self.mine_board[y][x] == 0)):
        self.board_data[y][x] = '   '
        for x_ in range((x - 1), (x + 2)):
            for y_ in range((y - 1), (y + 2)):
                if ((0 <= x_ < self.size) and (0 <= y_ < self.size)):
                    self.flood_fill(x_, y_)
def flood_fill(self, x, y):
    if ((self.board_data[y][x] == ' ◌ ') and (self.mine_board[y][x] == '◉')):
        raise Exception("the flood fill algo hit a mine, but it shouldn't because it will stop when it hits a number.")
    elif ((self.board_data[y][x] == ' ◌ ') and (self.mine_board[y][x] > 0)):
        self.board_data[y][x] = ((' ' + str(self.mine_board[y][x])) + ' ')
    elif ((self.board_data[y][x] == ' ◌ ') and (self.mine_board[y][x] == 0)):
        self.board_data[y][x] = '   '
        for x_ in range((x - 1), (x + 2)):
            for y_ in range((y - 1), (y + 2)):
                if ((0 <= x_ < self.size) and (0 <= y_ < self.size)):
                    self.flood_fill(x_, y_)