You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The branch yishu/TopSpinGUI, also #73, is part of a project made by one of the previous semester's students. The code can be activated through the following: Note: If you're using WSL, you'll need an X Server installation as this is a graphical program
# Run from base directory
python3 -m puzzlesolver.GUI.topspin_gui
You should see a GUI with TopSpin, a puzzle that involves rotating a circle of numbers and switching the positions of two numbers at set indices. The goal of the game is to put the numbers in order from smallest to largest (no end point specified).
However, this implementation has a few flaws.
The GUI is more of a draft implementation and a demo of the functionality of the tkinter module
This only works on the TopSpin Puzzle
While it is an impressive work, we wish to generalize this functionality to provide a GUI for all puzzles, not just TopSpin.
Suggested Workflow:
Design an abstract base class (ABC) that inherits from the Puzzle base class (similar to a ServerPuzzle). This is recommended if there is functionality outside of a Puzzle class that is required to run a GUI. Example naming: GUIPuzzle
Take an example puzzle and let it inherit the GUIPuzzle base class. Define the functions defined in GUIPuzzle.
Implement the GUI class that takes in an instance of a GUIPuzzle and an instance of a Solver. When play is called on this class, displays a tkinter interface with a Puzzle functionality.
Background
The branch
yishu/TopSpinGUI
, also #73, is part of a project made by one of the previous semester's students. The code can be activated through the following: Note: If you're using WSL, you'll need an X Server installation as this is a graphical program# Run from base directory python3 -m puzzlesolver.GUI.topspin_gui
You should see a GUI with TopSpin, a puzzle that involves rotating a circle of numbers and switching the positions of two numbers at set indices. The goal of the game is to put the numbers in order from smallest to largest (no end point specified).
However, this implementation has a few flaws.
While it is an impressive work, we wish to generalize this functionality to provide a GUI for all puzzles, not just TopSpin.
Suggested Workflow:
play
is called on this class, displays a tkinter interface with a Puzzle functionality.Expected API:
The text was updated successfully, but these errors were encountered: