- Coding Tutorial: https://youtu.be/vXcI_XI-Eww
In this tutorial, you will learn to create the sudoku with the built-in java awt/swing graphics library.
Throughout the tutorial, you will learn how to create a gui (graphical user interface) for the soduku game, style the sudoku tiles, and add dividing border lines. You will also learn how to select numbers and place them on the tile, and check for errors.
How to setup Java with Visual Studio Code
You can continue working on this project if you like. You can add a check to determine when the puzzle has been solved. To do so, you would add a variable to keep track of how many initial dashes '-' were in the puzzle. Each dash represents a white blank tile. Every time the player correctly places a tile, you would subrtact 1 from the count and if the count is 0, update the text label. You can also add a timer and add that in the text label to record how long it takes a player to complete the puzzle. You can also add more puzzles and solutions and randomly select a puzzle for the player. Finally, youm can create another JPanel with 5 buttons: Easy Medium Hard for varying difficulty levels for the sudoku game, Reset to clear the board and score but not the puzzle, and Solve (Give Up) to populate the solution onto the board.
