Skip to content

Simple Sudoku Game built on Pygame as a backtracking algorithm visualizer. Credits to TechWithTim for the idea.

License

Notifications You must be signed in to change notification settings

ymercad0/Sudoku-GUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku

PyGame Python License

Sudoku game written in Python with the Pygame library to visualize the backtracking algorithm.

Every time the program is executed, a random, solvable board is created and the user can attempt to solve it by clicking on the cells. Entering a number into a cell will be entered as a tentative value. Once the the user is sure that the inputted number is the correct entry, pressing the enter key will attempt to input the number onto the board. Correct answers will be permanently displayed while incorrect answers will be removed. Likewise, values can be removed by pressing on the backspace or delete keys. Example 1

If at any point the player decides to solve the board, the spacebar can be pressed. This will commence a visual that demonstrates how the backtracking algorithm is being applied in order to solve the board. Example 2

Controls

Keys Actions
Left Click Enters a value into that cell
Backspace/Delete Deletes the number in that cell
Space Solves the board via a backtracking algorithm visualizer
h Gives user a hint. Displays a random correct value on the board

Requirements

In order to run the program, the following is required:

  • Python 3
  • Pygame

Pygame can simply be installed from the command prompt by running pip install pygame or py -3.4 -m pip install pygame where -3.4 should be replaced with your current version of Python. Alternatively, you could download Pygame directly from their website (check the link under this project's About).

Downloading and running

After downloading and extracting the zip from the releases page, double click on sudoku_gui.py to run the program. Alternatively, open it from an IDE of choice.

About

Simple Sudoku Game built on Pygame as a backtracking algorithm visualizer. Credits to TechWithTim for the idea.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages