-
Language:
English
-
Language:
English
25.4. Sudoku Example: Cell Objects
Cell
andCellGroup
are subclasses ofSetOfNine
, which provides a propertyfree
with the typeSet<Integer>
. For aCell
it represents the individual candidate set. For aCellGroup
the set is the union of all candidate sets of its cells, or the set of digits that still need to be allocated.- You can write rules that detect the specific situations that permit the allocation of a value to a cell or the elimination of a value from some candidate set. For example, you can create a list of
Cell
objects with 81Cell
and 27CellGroup
objects. You can also combine the linkage provided by theCell
propertiescellRow
,cellCol
,cellSqr
and theCellGroup
propertycells
.