-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sudoku solver into a User Interface (UI) application #758
Comments
Key Improvements:
|
How It Works:
UI Creation: The SudokuUI class creates a 9x9 grid using JTextField for user input.
Input Parsing: The parseInput() method reads the values from the text fields and converts them to an integer array (board).
Sudoku Solving: When the "Solve" button is clicked, the solveSudoku() method is triggered, which solves the puzzle using the SudokuOptimized class and displays the solution in the UI.
Output Display: After solving, the solution is displayed in the grid, and a message dialog informs the user if the puzzle was solved or unsolvable.
import javax.swing.;
import java.awt.;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class SudokuUI extends JFrame {
}
class SudokuOptimized {
}

Output:
The text was updated successfully, but these errors were encountered: