Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 25. Sudoku Example
25.1. Sudoku Example: Loading the Example Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
Procedure 25.1. Task
- Open
sudoku.drl
in the IDE. - Execute
java org.drools.examples.DroolsExamplesApp
and click onSudokuExample
. The window contains an empty grid, but the program comes with a number of grids stored internally which can be loaded and solved. - Click on
to load one of the examples. All buttons are disabled until a grid is loaded. Loading the Simple
example fills the grid according to the puzzle's initial state. - Click on the
Solve
button and the JBoss Rules engine will fill out the remaining values. The buttons will be inactive again. - Alternatively, click on the
Step
button to see the next digit found by the rule set. The Console window will display detailed information about the rules which are executing to solve the step in a readable format like the example below:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Click on the
Dump
button to see the state of the grid. The cells show either the established value or the remaining possible candidates. See the example below:Copy to Clipboard Copied! Toggle word wrap Toggle overflow