public class Puzzle extends CoordinateMap<Cell>
Puzzle
.MapView.EntrySet
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
Puzzle()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
apply(Rule rule)
|
boolean |
isLegal()
Method to test if the current
Cell values constitute a legal
Sudoku puzzle. |
boolean |
isSolved()
Method to test if the current
Cell values constitute a solved
Sudoku puzzle. |
List<CoordinateMap<Cell>> |
nonets()
Method to get the sub-
CoordinateMap s representing the 3x3 boxes
(nonets). |
List<CoordinateMap<Cell>> |
subMaps()
Method to get the sub-
CoordinateMap s representing the
9-Cell groups where the digits 1-9 must appear exactly once. |
List<CoordinateMap<Cell>> |
subMapsOf(Cell cell)
|
addTableModelListener, asList, clear, column, columns, comparator, containsKey, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, firstKey, get, getColumnClass, getColumnCount, getColumnName, getMax, getMaxX, getMaxY, getMin, getMinX, getMinY, getRowCount, getTableModelListeners, getType, getValueAt, headMap, includes, isCellEditable, lastKey, map, put, put, remove, removeTableModelListener, resize, resize, row, rows, setValueAt, subMap, subMap, tailMap
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, size
public Puzzle()
public List<CoordinateMap<Cell>> nonets()
CoordinateMap
s representing the 3x3 boxes
(nonets).List
of 3x3 nonet CoordinateMap
s.public List<CoordinateMap<Cell>> subMaps()
CoordinateMap
s representing the
9-Cell
groups where the digits 1-9 must appear exactly once.
See CoordinateMap.rows()
, CoordinateMap.columns()
, and nonets()
.List
of Sudoku sub-CoordinateMap
s.public List<CoordinateMap<Cell>> subMapsOf(Cell cell)
CoordinateMap
s representing the
9-Cell
groups including the argument Cell
. See
CoordinateMap.rows()
, CoordinateMap.columns()
, and nonets()
.cell
- The argument Cell
.List
of Sudoku sub-CoordinateMap
s for the
argument Cell
.subMaps()
public boolean isLegal()
Cell
values constitute a legal
Sudoku puzzle.public boolean isSolved()
Cell
values constitute a solved
Sudoku puzzle.Copyright © 2015–2020 Allen D. Ball. All rights reserved.