General sudoku solver written in python 3 without any external dependencies.
Navigate to where you want to clone SudokuSolver. Note that cloning will create a "SudokuSolver
" folder itself.
$ git clone https://github.com/syntaxvoid/SudokuSolver.git
Open a command prompt and navigate to the folder containing sudoku.py
. Then run
python sudoku.py [-f PATH_TO_BOARD] [-a]
PATH_TO_BOARD
is a file path to a sudoku board. This is optional. If this is not supplied, the user will be asked to enter the path manually.
-a
is a boolean flag. This is optional. If this is supplied, all solutions to the board will be found and not just the first one.
If you are using the executable, replace python sudoku.py
with sudoku
in the command above (granted you are in the folder with sudoku.exe
).
Make sure you have pyinstaller installed. Type pyinstaller
in any command prompt; if you see a help message then it's installed. If you need to install pyinstaller
, run
$ pip install pyinstaller
Then change directory to wherever sudoku.py is located and execute the builder batch script (this only works for windows)
$ builder
Say yes to any prompts (if they appear). This will create two folders: "dist
", and "build
". The executable you need to run is found under "dist/
" and is named sudoku.exe
.
Now run SudokuSolver\dist\sudoku.exe
and let the Sudoku solving begin.
If you want to make your own contributions, make sure you're a collaborator. Once you're a collaborator, run the following to make the master branch the default, replacing YOUR_GITHUB_USERNAME with your github.com username.
$ cd SudokuSolver
$ git remote rm origin
$ git remote add origin https://YOUR_GITHUB_USERNAME@github.com/syntaxvoid/SudokuSolver.git
- Start by pulling changes made by others.
$ git pull origin master
- Make your own changes and stage them for comitting.
$ git add my_new_file.py
$ git add my_new_file2.py
- Commit your changes.
$ git commit -m "Summarize your changes."
- Push your changes to the master branch. If you get an error about https request denied, make sure you complete the 'Setting remote origin' section.
$ git push -u origin master
Feel free to fork your own version and submit a pull request (which will add yourself as a contributor).