Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 771 Bytes

readme.md

File metadata and controls

15 lines (8 loc) · 771 Bytes

Sudoku

This program can solve and generate standard 9 by 9 Sudoku's with a simple GUI.

Sudoku grid screenshot

Solving

This uses a standard randomised backtracking algorithm to solve the Sudoku, and returns that the given Sudoku is unsolvable if no solution is found after searching all possible arrangements.

Generation

To generate a new Sudoku grid, this program solves the empty grid: because the solving algorithm is randomised, this generates a randomised solution. Then, the algorithm randomly empties tiles to generate an incomplete grid.

You can change the difficulty of the generated Sudoku's by changing the value of NUM_GENERATE in Gameboard.java. This is the number of tiles which are generated.