Welcome to the Sudoku project — a PyGame-based Sudoku puzzle generator and solver using backtracking, designed with a user-friendly GUI.
- ✅ Random Puzzle Generation every run (guaranteed solvable)
- 🎮 GUI built with
pygame - ✍️ Click cells to input numbers
- 🧠 Backtracking Solver (Press
S) - 🧪 Check Your Solution (Press
C) - 🔄 Generate a new puzzle anytime (Press
N) - ✅ Visual validation ("Correct"/"Incorrect" popup)
- 👀 Clean, legible fonts and layout
Screenshots stored in the img/ folder:
- Puzzle screen with inputs
- Solved board display
- Correctness check message
| Key | Action |
|---|---|
| S | Auto-solve puzzle |
| C | Check current input |
| N | New puzzle |
| Q | Quit the game |
Click on a cell and type digits 1-9 to manually play.
Sudoku/
├── img/ # Screenshots folder
├── Sudoku.py # Main game file
├── README.md # Project description
└── LICENSE
This game uses a recursive backtracking algorithm that:
- Fills the board with a complete valid solution
- Removes a number of cells to create a playable puzzle
- Solves the puzzle again using the same logic to ensure uniqueness
- Python 3.6+
pygame(pip install pygame)
python3 Sudoku.pyMake sure your terminal has access to GUI display (macOS/Linux may require permissions).
Created by CodesBySanjay 🎓
Project Branch: Sudoku in Python Repo
Each will have its own dedicated branch and README.