|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.keang.sudoku.Generator
public class Generator
Generates a sudoku grid
Nested Class Summary | |
---|---|
static class |
Generator.PuzzleStoreItem
|
Field Summary | |
---|---|
static int |
MAX_QUEUE_SIZE
|
Constructor Summary | |
---|---|
Generator()
|
Method Summary | |
---|---|
void |
addStoreListener(StoreListener l)
Adds a listener. |
void |
cancelGenerate()
Cancels any ongoing generation |
(package private) Puzzle |
generatePuzzle(Puzzle.PuzzleDifficulty difficulty,
java.beans.PropertyChangeListener listener)
Generates a puzzle with this difficulty level |
void |
load()
Loads the puzzles in this store |
void |
removeAllStoreListeners()
Removes the listener |
void |
removeStoreListener(StoreListener l)
Removes the listener |
void |
save()
Saves the puzzles in this store |
void |
startBackgroundGeneration()
Starts the background generator thread. |
void |
stopBackgroundGeneration()
Stops the background generator thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_QUEUE_SIZE
Constructor Detail |
---|
Generator()
Method Detail |
---|
public void startBackgroundGeneration()
public void stopBackgroundGeneration()
Puzzle generatePuzzle(Puzzle.PuzzleDifficulty difficulty, java.beans.PropertyChangeListener listener)
difficulty
- the difficulty level of the puzzle to generatelistener
- a listener of progress events. For each new attempt an event is sent.
public void cancelGenerate()
public void addStoreListener(StoreListener l)
l
- - the listener to addpublic void removeStoreListener(StoreListener l)
l
- - the listener to removepublic void removeAllStoreListeners()
public void save() throws java.io.FileNotFoundException
java.io.FileNotFoundException
public void load() throws java.io.IOException, IllegalGridException
IllegalGridException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |