Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_gif(self):
- self.original, self.btSolution = findAnswer(self.sudoku, gif=1)
- for sudoku in self.btSolution:
- time.sleep(0.1)
- self.board.delete("gifNumbers")
- for row in range(9):
- for col in range(9):
- if sudoku[row][col] != 0:
- x = row * CELL + 0.5 * CELL
- y = col * CELL + 0.5 * CELL
- color = "red" if sudoku[row][col] == self.original[row][col] else "black"
- self.board.create_text(x, y, text=sudoku[row][col], fill=color, tags="gifNumbers")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement