Skip to content

huda-usman/sudoku-solver-game

Repository files navigation


Java OOP Algorithm Difficulty Dashboard


A fully-featured Java-based Sudoku game with automatic puzzle generation, recursive backtracking solver, performance analytics dashboard, achievement system, game history comparison, and much more — built with clean Object-Oriented Architecture.


✨ Features🧠 How It Works📸 Screenshots🚀 Getting Started🏗️ Architecture


✨ Features

🎮 Core Game

Feature Description
🎯 Interactive GUI Board Playable 9×9 Sudoku with real-time feedback
🔢 3 Difficulty Levels Easy (25 removals), Medium (45), Hard (57)
🤖 Auto Solver Recursive backtracking solves any puzzle instantly
💡 Hint System Reveals correct value for any selected cell
Mistake Detection Highlights incorrect entries in red
⏱️ Timer Tracks time taken to solve each puzzle
🔄 Reset Board Clears user input while preserving original puzzle

📊 Performance & Analytics

Feature Description
📈 Performance Dashboard Completion time, accuracy rate, efficiency score
🎨 Performance Visualization Circular score chart with detailed breakdown
📊 Interactive Charts Hints, mistakes, time & accuracy bar charts
🔬 Advanced Statistics Mean/median accuracy, standard deviation, trend slope
🔁 Game History Comparison Compare current vs previous games side by side

🏆 Achievements & Progress

Feature Description
🏅 Achievement System Diamond, Gold, Platinum, Bronze tiers
Perfect Game · ⚡ Speed Demon · 🎯 Accuracy Master · 🧠 Hintless Hero Unlock by playing
🏋️ Practice Mode Targeted practice based on your performance stats
📄 Generate Report Save detailed performance report as PDF/TXT
🔗 Share Results Share your score summary

🏗️ Project Architecture

SudokuGame/
├── SudokuBoard.java      # Core board state management
├── SudokuSolver.java     # Recursive backtracking solver & hint engine
├── PuzzleGenerator.java  # Random puzzle generation with difficulty control
├── SudokuGUI.java        # Main game interface & user interaction
└── finalWindow.java      # Performance dashboard & result display

🧠 How the Solver Works

The solver uses recursive backtracking — a classic algorithm that tries every possible number and undoes bad choices automatically.

1. Find next empty cell
2. Try numbers 1–9
3. Check validity (row, column, 3×3 box)
4. If valid → place number → recurse
5. If stuck → backtrack → try next number
6. Repeat until board is complete
Property Detail
Algorithm Recursive Backtracking
Time Complexity O(9^m) worst case (m = empty cells)
Space Complexity O(m) recursion stack
Practical Speed Solves any valid puzzle in milliseconds

📸 Screenshots

🎮 Game Board

Empty Board Easy Puzzle
Medium Puzzle Hard Puzzle

💡 Gameplay Features

Hint Mistake
Auto Solved

📊 Performance Dashboard

KPI Overview Performance Visualization Interactive Charts

🏆 Game History & Stats

Overview Detailed Comparison Advanced Stats

🎖️ Extra Features

Achievements Practice Mode Share Results Generate Report

🚀 Getting Started

Prerequisites

  • Java JDK 8 or higher

Run the Game

# Clone the repository
git clone https://github.com/huda-usman/sudoku-solver-game.git

# Navigate to project
cd sudoku-solver-game

# Compile all Java files
javac *.java

# Run the game
java SudokuGUI

📁 Repository Structure

sudoku-solver-game/
│
├── SudokuBoard.java        # Core board state management
├── SudokuSolver.java       # Recursive backtracking solver & hint engine
├── PuzzleGenerator.java    # Random puzzle generation with difficulty control
├── SudokuGUI.java          # Main game interface & user interaction
├── finalWindow.java        # Performance dashboard & result display
│
├── 📂 screenshots/         # All UI screenshots
└── README.md

📄 License

This project is open-source under the MIT License.


🙋‍♀️ Connect with Me

Developed by Huda Usman

LinkedIn


If you found this project interesting, please give it a star!

About

Java-based Sudoku game with recursive backtracking solver, performance dashboard, achievements & analytics

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages