org.drools.examples.sudoku
Class Sudoku

java.lang.Object
  extended by org.drools.examples.sudoku.swing.AbstractSudokuGridModel
      extended by org.drools.examples.sudoku.Sudoku
All Implemented Interfaces:
SudokuGridModel

public class Sudoku
extends AbstractSudokuGridModel
implements SudokuGridModel

An object of this class solves Sudoku problems.


Field Summary
 
Fields inherited from interface org.drools.examples.sudoku.swing.SudokuGridModel
INNER_GRID_HEIGHT, INNER_GRID_WIDTH, NUM_COLS, NUM_ROWS
 
Constructor Summary
Sudoku(KnowledgeBase kBase)
          Constructor.
 
Method Summary
 String getCellValue(int iRow, int iCol)
           
 void setCellValues(Integer[][] cellValues)
           
 void solve()
           
 void step()
           
 String toString()
           
 
Methods inherited from class org.drools.examples.sudoku.swing.AbstractSudokuGridModel
addSudokuGridListener, fireCellUpdatedEvent, fireRestartEvent, removeSudokuGridListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.drools.examples.sudoku.swing.SudokuGridModel
addSudokuGridListener, removeSudokuGridListener
 

Constructor Detail

Sudoku

public Sudoku(KnowledgeBase kBase)
Constructor.

Parameters:
kBase - a Knowledge Base with rules for solving Sudoku problems.
Method Detail

getCellValue

public String getCellValue(int iRow,
                           int iCol)
Specified by:
getCellValue in interface SudokuGridModel

solve

public void solve()
Specified by:
solve in interface SudokuGridModel

step

public void step()
Specified by:
step in interface SudokuGridModel

setCellValues

public void setCellValues(Integer[][] cellValues)
Specified by:
setCellValues in interface SudokuGridModel

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.