Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. def create_gif(self):
  2. self.original, self.btSolution = findAnswer(self.sudoku, gif=1)
  3.  
  4. for sudoku in self.btSolution:
  5. time.sleep(0.1)
  6. self.board.delete("gifNumbers")
  7.  
  8. for row in range(9):
  9. for col in range(9):
  10.  
  11. if sudoku[row][col] != 0:
  12. x = row * CELL + 0.5 * CELL
  13. y = col * CELL + 0.5 * CELL
  14.  
  15. color = "red" if sudoku[row][col] == self.original[row][col] else "black"
  16.  
  17. self.board.create_text(x, y, text=sudoku[row][col], fill=color, tags="gifNumbers")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement