Package org.drools.examples.sudoku
Class SudokuExample
- java.lang.Object
-
- org.drools.examples.sudoku.SudokuExample
-
- All Implemented Interfaces:
ActionListener,EventListener
public class SudokuExample extends Object implements ActionListener
This example shows how Drools can be used to solve a 9x9 Sudoku Grid. This Class hooks together the GUI and the model and allows you to load different grids. <pgt; Several grids are provided via File -> Samples. <pgt; For loading a grid from a file, prepare a text file containing nine text lines as shown below and select File -> Open... <pgt; <pre> 95 1 3 752 8 7 3 9 4 8 5 2 6 814 7 5 1 49 5 8 6 8 4 7 3 </pre>
-
-
Constructor Summary
Constructors Constructor Description SudokuExample()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent ev)static org.kie.api.runtime.KieContainercreateSudokuKieContainer()voidinit(org.kie.api.runtime.KieContainer kc, boolean exitOnClose)static voidmain(String[] args)
-
-
-
Method Detail
-
main
public static void main(String[] args)
-
createSudokuKieContainer
public static org.kie.api.runtime.KieContainer createSudokuKieContainer()
-
init
public void init(org.kie.api.runtime.KieContainer kc, boolean exitOnClose)
-
actionPerformed
public void actionPerformed(ActionEvent ev)
- Specified by:
actionPerformedin interfaceActionListener
-
-