The past few days to try to write graphics program with the Java swing, while learning to write a simple Sudoku game, in the process of writing learned a lot about swing things, but also for the programming of the graphical program has a little bit of a simple understanding:
- Good its prior to the device, since the writing graphics program first to play an IDE skilled, do not care what the IDE, like which to use that, or rush to do more trouble;
- First realize a graphical program of the prototype algorithm, such as Sudoku game will first realize how to generate a Sudoku the most primitive problem, in solving this problem, how to solve a Sudoku algorithm must first write out;
- Do not rush to integrate the algorithm into the graphical interface, you can try to write a simple graphics program, such as first try to display a number on the graphical interface, display a Sudoku grid, and then step by step to improve the iteration;
- For the class division to be reasonable, for the class to provide a careful consideration of the method, feel in the real code when it becomes a lack of what to complement what, before completely planning a class;
- The ability to meet their own features to read more read other people's code, Google search plus Java documents;
The basic functions that have been implemented:
- Start the game to create a easy difficulty sudoku problem;
- End Exit game;
- Adjust the game difficulty: Easy,normal,hard;
- Generate answers to the current Sudoku problem;
Features that need to be perfected:
- More user-friendly interface implementation;
- Add a timer;
- For user error input to be prompted;
- After the successful solution of Sudoku to have a hint;
Java Sudoku Games