diff options
author | Joe Anderson <jandew+dev@gmail.com> | 2016-02-24 10:12:32 -0800 |
---|---|---|
committer | Joe Anderson <jandew+dev@gmail.com> | 2016-02-25 06:37:00 -0800 |
commit | fa8d032a5dbe115f15dc1e5f992f2065957a868e (patch) | |
tree | bf84647cd5f30c562e9a1c0afcd512c3128db7a5 /oo.py | |
parent | 1999a58cee723c5f2d8e10ead22676a3e6d2300a (diff) | |
download | oo-master.tar.gz oo-master.zip |
Diffstat (limited to 'oo.py')
-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 |