diff options
| -rw-r--r-- | oo.py | 15 | 
1 files changed, 12 insertions, 3 deletions
| @@ -887,10 +887,12 @@ class ooPlay:                                    " including fixed",                                    {})}                             ), -                     "G": ("New | Quit", +                     "G": ("New | Quit | Solve",                             {"N": ("use n to start a new game",                                    {}),                              "Q": ("use q to quit the program", +                                  {}), +                            "S": ("use S to show a solution",                                    {})}                            ),                       "T": ("Show errors | Inverted | Toroidal | eXtra hard", @@ -963,12 +965,19 @@ class ooPlay:                      self.new_game()                  elif inp in "H":                      self.write_help() -                elif inp in "Ss": +                elif inp in "S": +                    self.write("show a solution") +                    for position in self.fixed: +                        self.fixed[position] = False +                    self.puzzle.set_data_from_edges(data='pieces') +                    self.display() +                    self.write() +                elif inp in "s":                      self.write("do NOT "*self.show_errors + "show errors")                      self.show_errors = not self.show_errors                      self.display()                      self.write() -                #TODO: add in show solution, with undo option +                #TODO: add in an undo button                  elif inp in "Ii":                      self.write("puzzle is now"                               + " NOT"*self.inverted | 
