https://github.com/khushi130404/sudoku
Sudoku is an interactive puzzle game built in Android Studio using Java, featuring backtracking and fragments for a seamless user experience. It efficiently manages the 9x9 grid using a 4D array structure (3x3x3x3).
https://github.com/khushi130404/sudoku
android-studio backtracking fragments java multithreading
Last synced: 6 months ago
JSON representation
Sudoku is an interactive puzzle game built in Android Studio using Java, featuring backtracking and fragments for a seamless user experience. It efficiently manages the 9x9 grid using a 4D array structure (3x3x3x3).
- Host: GitHub
- URL: https://github.com/khushi130404/sudoku
- Owner: Khushi130404
- Created: 2024-05-11T16:28:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-09T03:57:35.000Z (about 1 year ago)
- Last Synced: 2025-08-17T13:33:02.443Z (6 months ago)
- Topics: android-studio, backtracking, fragments, java, multithreading
- Language: Java
- Homepage:
- Size: 1.12 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Sudoku
Sudoku is an interactive puzzle game built in Android Studio using Java. This app leverages backtracking to solve Sudoku puzzles and provides a seamless user experience through the use of Android fragments. The Sudoku grid is managed using an efficient 4D array structure to represent the entire 9x9 grid as 3x3 sub-grids as 3x3x3x3.
## Main Sections
- New Game: Start a fresh Sudoku puzzle.
- Continue Game: Resume your previous game where you left off.
- Backtracking Visualization: Visualize the solving process using multithreading for a smooth experience.
- Victory Page: Celebrate your success with a dedicated victory screen upon completing the puzzle.
## Additional Features
- Time Counter: Tracks the duration of the game.
- Hint System: Provides hints to help solve the puzzle.
- Remaining Digits Tracker: Shows how many numbers are left to complete the grid.
- Score Calculation: Keeps track of your performance based on time and accuracy.
- Penalty System: Adds penalties for incorrect moves.
- Difficulty Levels: Choose from Easy, Medium, or Hard levels to suit your skill.
## Technical Details
- Language: Java
- IDE: Android Studio
- Algorithm: Backtracking algorithm for solving Sudoku puzzles.
- UI: Utilizes fragments to create a dynamic and modular interface.
- Data Structure: Uses a 4D array (3x3x3x3) to efficiently manage the entire Sudoku grid.
## How It Works
### Backtracking Algorithm
The core of the Sudoku solver is a backtracking algorithm. It systematically searches for the correct numbers to place in each cell, ensuring that the Sudoku rules are followed:
- Each row must have numbers 1 to 9 without repetition.
- Each column must have numbers 1 to 9 without repetition.
- Each 3x3 sub-grid must have numbers 1 to 9 without repetition.
### Multithreading for Visualization
The app uses multithreading to display the backtracking process in real time. This feature provides users with a visual representation of how the algorithm solves the puzzle step-by-step.
## Usage
1. Launch the App: Open the Sudoku app on your Android device.
2. Select a Mode: Choose between New Game or Continue Game.
3. Set Difficulty: Pick your desired difficulty level.
4. Start Playing: Use hints, track your time, and aim for the highest score!
5. Celebrate Victory: Upon completing the puzzle, enjoy the victory page to mark your achievement.