Skip to content

Commit

Permalink
Added highlighting if trying to change puzzle clue
Browse files Browse the repository at this point in the history
  • Loading branch information
sotolf2 authored Oct 19, 2019
1 parent 32e05c3 commit e4ca452
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sudoku.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,8 @@ def __key_pressed(self, event):
if self.row >= 0 and self.col >= 0 and event.char in "1234567890":
if self.mode is Mode.solution and self.game.get_origin(self.row,self.col) == 0:
self.game.set_cell(self.row, self.col, int(event.char))
elif self.mode is Mode.solution:
self.highlight = int(event.char)
elif self.mode is Mode.candidate:
self.game.toggle_candidate(self.row, self.col, int(event.char))
self.__draw_puzzle()
Expand Down

0 comments on commit e4ca452

Please sign in to comment.