public class Puzzle extends CoordinateMap<Cell> implements Cloneable
Puzzle.| Modifier and Type | Class and Description |
|---|---|
static class |
Puzzle.Solution
|
MapView.EntrySetAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Method and Description |
|---|---|
Puzzle |
clone() |
Map<Label,String> |
clues() |
Map<String,String> |
headers() |
boolean |
isSolved()
|
static Puzzle |
load(String path)
|
List<String> |
notes() |
Puzzle |
parent()
Method to get the parent of this
Puzzle. |
Puzzle |
seed()
Method to get the "seed" of this
Puzzle. |
void |
setSolution(Coordinate coordinate,
Character character)
Method to set the solution in a
Puzzle. |
Map<Label,Puzzle.Solution> |
solutions() |
Stream<Puzzle> |
solve(Set<CharSequence> dictionary)
Method to solve a
Puzzle. |
void |
writeTo(OutputStream out)
|
void |
writeTo(PrintWriter out)
|
void |
writeTo(Writer out)
|
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, tailMapcontainsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, sizepublic Map<Label,Puzzle.Solution> solutions()
public void setSolution(Coordinate coordinate, Character character)
Puzzle.coordinate - The Coordinate of the Cell..character - The solution Character.IllegalArgumentException - If any of the Cells are already with
a different Character than specified
in the String.public void writeTo(OutputStream out) throws IOException
out - The OutputStream.IOException - If the Puzzle cannot be written.public void writeTo(Writer out) throws IOException
out - The OutputStream.IOException - If the Puzzle cannot be written.public void writeTo(PrintWriter out) throws IOException
out - The OutputStream.IOException - If the Puzzle cannot be written.public Puzzle clone() throws CloneNotSupportedException
clone in class AbstractMap<Coordinate,Cell>CloneNotSupportedExceptionpublic static Puzzle load(String path) throws IOException
path - The resource path.Puzzle.IOException - If the path cannot be parsed.Copyright © 2015–2020 Allen D. Ball. All rights reserved.