https://github.com/terenceclzhang/sodoku-solver
A Python program made with Pygame which can solve Sodoku puzzles using the backtracking algorithm.
https://github.com/terenceclzhang/sodoku-solver
backtracking-algorithm pygame sodoku sodoku-generator sodokusolver
Last synced: 3 months ago
JSON representation
A Python program made with Pygame which can solve Sodoku puzzles using the backtracking algorithm.
- Host: GitHub
- URL: https://github.com/terenceclzhang/sodoku-solver
- Owner: TerenceCLZhang
- Created: 2023-07-15T12:49:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-04T10:15:33.000Z (4 months ago)
- Last Synced: 2025-02-04T11:23:21.586Z (4 months ago)
- Topics: backtracking-algorithm, pygame, sodoku, sodoku-generator, sodokusolver
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sudoku Solver
This is a Sudoku Solver program implemented using Python and the Pygame library. The program allows you to solve Sudoku puzzles interactively or generate random Sudoku boards to solve.
## Features
- Solve Sudoku puzzles using a backtracking algorithm.
- Generate random Sudoku boards with varying levels of difficulty.
- Interactively select cells, set cell values, and clear cell values.
- Visualize the solving process with a graphical user interface.## Requirements
- Python 3.x
- Pygame## Usage
1. Install the required dependencies:
```bash
pip install pygame
```2. Run the program:
```bash
python main.py
```3. Use the following controls:
- Spacebar: Solve the Sudoku puzzle using the backtracking algorithm.
- R: Reset the board to the original puzzle.
- G: Generate a new random Sudoku board.
- Number keys (1-9): Set the selected cell to the corresponding value.
- Backspace: Clear the value of the selected cell.
- Left-click: Select a cell.
- Left-click again to deselect a cell4. The program will display the Sudoku board and the solving process. Once the puzzle is solved or if there is no solution, a pop-up message will be shown.