net.sf.kagiru.core
Class Puzzle

java.lang.Object
  extended by net.sf.kagiru.core.Puzzle
All Implemented Interfaces:
java.io.Serializable

public class Puzzle
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static int AUTOMATICALLY_CREATED
           
static int MANUALLY_CREATED
           
 
Constructor Summary
Puzzle(boolean beingDefined, AllowedValues allowedValues, PuzzleFormat format)
           
Puzzle(int creationType, boolean beingDefined, AllowedValues allowedValues, PuzzleFormat format)
           
Puzzle(int creationType, boolean beingDefined, DifficultyLevel level, boolean symmetric, AllowedValues allowedValues, PuzzleFormat format)
           
 
Method Summary
 void addMillisBeforeLastBreak(long extraMillisBeforeLastBreak)
           
 boolean canPause()
           
 void clear(boolean restart)
           
 Puzzle clone()
           
 void exit()
           
 java.util.List<Cell> getAllCells()
           
 AllowedValues getAllowedValues()
           
 Cell getCell(int column, int row)
           
 java.util.List<Cell> getCellsFromColumn(int column)
           
 java.util.List<Cell> getCellsFromRow(int row)
           
 double getCompletion()
           
 int getCompletionDenumerator()
           
 int getCompletionNumerator()
           
 java.util.Calendar getCreationTimestamp()
           
 int getCreationType()
           
 DifficultyLevel getDifficultyLevel()
           
 DifficultyStatistics getDifficultyStatistics()
           
 java.lang.String getFilename()
           
 PuzzleFormat getFormat()
           
 java.util.Collection<Region> getMainRegions()
           
 int getNbCompleted()
           
 int getNbPauses()
           
 int getNbPredefinedCells()
           
 int getNbRestarts()
           
 int getNbUndefinedCells()
           
 boolean getPause()
           
 int getProgressByValue(java.lang.String value)
           
 long getTime()
           
 int getTotalNbCells()
           
 long getTotalTime()
           
 long getTotalTimePriorToRestart()
           
 boolean hasDifficultyLevel()
           
 boolean hasTime()
           
 boolean isBeingDefined()
           
 boolean isCellEditable(int column, int row)
           
 boolean isComplete()
           
 boolean isCorrect()
           
 boolean isFinished()
           
 boolean isHalted()
           
 boolean isSymmetric()
           
 void resetTimer()
           
 void setAllowedValues(AllowedValues allowedValues)
           
 void setBeingDefined(boolean beingDefined)
           
 void setCreationTimestamp(java.util.Calendar calendar)
           
 void setCreationType(int creationType)
           
 void setDifficultyStatistics(DifficultyStatistics difficultyStatistics)
           
 void setFileName(java.lang.String filename)
           
 void setLevel(DifficultyLevel level)
           
 void setNbPauses(int nbPauses)
           
 void setNbRestarts(int nbRestarts)
           
 void setPause(boolean pause)
           
 void setSymmetric(boolean symmetric)
           
 void setTotalTimePriorToRestart(long totalTimePriorToRestarts)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTOMATICALLY_CREATED

public static final int AUTOMATICALLY_CREATED
See Also:
Constant Field Values

MANUALLY_CREATED

public static final int MANUALLY_CREATED
See Also:
Constant Field Values
Constructor Detail

Puzzle

public Puzzle(boolean beingDefined,
              AllowedValues allowedValues,
              PuzzleFormat format)

Puzzle

public Puzzle(int creationType,
              boolean beingDefined,
              AllowedValues allowedValues,
              PuzzleFormat format)

Puzzle

public Puzzle(int creationType,
              boolean beingDefined,
              DifficultyLevel level,
              boolean symmetric,
              AllowedValues allowedValues,
              PuzzleFormat format)
Method Detail

addMillisBeforeLastBreak

public void addMillisBeforeLastBreak(long extraMillisBeforeLastBreak)

canPause

public boolean canPause()

clear

public void clear(boolean restart)

clone

public Puzzle clone()
Overrides:
clone in class java.lang.Object

exit

public void exit()

getAllCells

public java.util.List<Cell> getAllCells()

getAllowedValues

public AllowedValues getAllowedValues()

getCell

public Cell getCell(int column,
                    int row)

getCellsFromColumn

public java.util.List<Cell> getCellsFromColumn(int column)

getCellsFromRow

public java.util.List<Cell> getCellsFromRow(int row)

getCompletion

public double getCompletion()

getCompletionDenumerator

public int getCompletionDenumerator()

getCompletionNumerator

public int getCompletionNumerator()

getCreationTimestamp

public java.util.Calendar getCreationTimestamp()

getCreationType

public int getCreationType()

getDifficultyLevel

public DifficultyLevel getDifficultyLevel()
                                   throws NoDifficultyLevelException
Throws:
NoDifficultyLevelException

getDifficultyStatistics

public DifficultyStatistics getDifficultyStatistics()
                                             throws NoDifficultyStatisticsAvailableException
Throws:
NoDifficultyStatisticsAvailableException

getFilename

public java.lang.String getFilename()

getFormat

public PuzzleFormat getFormat()

getMainRegions

public java.util.Collection<Region> getMainRegions()

getNbCompleted

public int getNbCompleted()

getNbPauses

public int getNbPauses()

getNbPredefinedCells

public int getNbPredefinedCells()

getNbRestarts

public int getNbRestarts()

getNbUndefinedCells

public int getNbUndefinedCells()

getPause

public boolean getPause()

getProgressByValue

public int getProgressByValue(java.lang.String value)

getTime

public long getTime()

getTotalNbCells

public int getTotalNbCells()

getTotalTime

public long getTotalTime()

getTotalTimePriorToRestart

public long getTotalTimePriorToRestart()

hasDifficultyLevel

public boolean hasDifficultyLevel()

hasTime

public boolean hasTime()

isBeingDefined

public boolean isBeingDefined()

isCellEditable

public boolean isCellEditable(int column,
                              int row)

isComplete

public boolean isComplete()

isCorrect

public boolean isCorrect()

isFinished

public boolean isFinished()

isHalted

public boolean isHalted()

isSymmetric

public boolean isSymmetric()

resetTimer

public void resetTimer()

setAllowedValues

public void setAllowedValues(AllowedValues allowedValues)

setBeingDefined

public void setBeingDefined(boolean beingDefined)

setCreationTimestamp

public void setCreationTimestamp(java.util.Calendar calendar)

setCreationType

public void setCreationType(int creationType)

setDifficultyStatistics

public void setDifficultyStatistics(DifficultyStatistics difficultyStatistics)

setFileName

public void setFileName(java.lang.String filename)

setLevel

public void setLevel(DifficultyLevel level)

setNbPauses

public void setNbPauses(int nbPauses)

setNbRestarts

public void setNbRestarts(int nbRestarts)

setPause

public void setPause(boolean pause)
              throws CannotPauseException
Throws:
CannotPauseException

setSymmetric

public void setSymmetric(boolean symmetric)

setTotalTimePriorToRestart

public void setTotalTimePriorToRestart(long totalTimePriorToRestarts)


This code documentation is disclosed as part of Kagiru Sudoku. It is licensed under the GNU General Public License (GPL) and comes with NO WARRANTY. See file license.txt for more info.