Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
721 B
1
Indexable
Never


class Sudoku:
    def __init__(self,rows):
        self.rows = rows
        coloumns = []
        for i in range(0,9):
            tmp = []
            for j in range(0,9):
                tmp.append(rows[j][i])
            coloumns.append(tmp)

    def Next_Home(self,row,col):
        if col < 8:
            return [row,col+1]
        elif col == 8:
            return [row+1,0]

    def solve(self,row,col):
        if(row == 9 and col == 0):
            print(self.rows)
        else:
            if(self.rows[row][col] == 0):

            else:
                l = Sudoku.Next_Home(row,col)
                Sudoku.solve(l[0],l[1])

    #khastam bazgashti bezanam nayunestam kamelesh konam



def main():



main()