public class MultiDesignsInstance extends PuzzleInstance
Constructor and Description |
---|
MultiDesignsInstance() |
MultiDesignsInstance(MultiDesignsInstance g) |
Modifier and Type | Method and Description |
---|---|
boolean |
addSubgraphToSolution(SubGraph sub) |
boolean |
arePermissible(java.util.ArrayList<SimpleEdge> edges) |
PuzzleInstance |
copyPuzzle()
Make a copy of this object, but not exactly! IMPORTANT: This copy should make a copy so that the copy's initial
settings are set to this objects current settings.
|
int |
countDuplicateEdges() |
java.util.HashMap<SimpleEdge,java.util.ArrayList<java.lang.Integer>> |
getCoveredEdges() |
int |
getCurrentSolutionSize() |
VertexData |
getDefaultVertexDataObject() |
java.util.ArrayList<SimpleEdge> |
getDuplicateEdgesAsList() |
int |
getNumberOfUncoveredEdges() |
java.lang.String |
getProcessedSolution() |
int |
getScore()
Return the current score of the active game.
|
java.util.ArrayList<SubGraph> |
getSolutionSubgraphs() |
SubGraph[] |
getSubgraphs() |
java.lang.String |
getSubgraphsAsString() |
int |
getTolerance() |
PuzzleInstance |
getTryItInstanceForUseOnPlayScreen()
What kind of puzzle should the TryIt button produce? Return null if Try it is not applicable
|
java.util.ArrayList<Edge> |
getUncoveredEdges() |
java.util.ArrayList<SimpleEdge> |
getUncoveredSimpleEdges() |
boolean |
isCurrentStateValidSolution()
Each instance needs to determine when the solution is valid.
|
boolean |
isEventForThisPuzzleType(Event<?> e)
Return true iff this event is of type T.
|
boolean |
isPermissible(SimpleEdge e) |
boolean |
isSolutionRefinable()
For optimization problems, for instance, this will return true.
|
boolean |
removeLastSubgraphFromSolution() |
boolean |
removeSubgraphFromSolution(SubGraph sub) |
void |
setNoSolution() |
void |
setSolutionStuff(DesignType type,
int tolerance,
java.util.ArrayList<SubGraph> sol) |
boolean |
setSubgraphs(java.lang.String names) |
void |
setTolerance(int tol)
Sets the padding and resets tolerance (since they are not compatible).
|
boolean |
setToleranceAndType(DesignType type,
int tol,
boolean fireEvent) |
boolean |
setType(DesignType type)
Set type if the solution is currently empty.
|
boolean |
tryItResultsAreBinding()
Return true only if Try It mode, using the type from getTryItInstance, will produce a result that is AWLAYS valid
for the puzzle type.
|
java.lang.String |
uniqueIdentifier(Vertex v)
Return a string that represents the data related to the given Vertex in a way that is different if the data is
different.
|
void |
updateStateBasedOnAlgorithmResult(java.lang.String algorithmResult)
Updates the algorithm's state based on the algorithm result.
|
boolean |
usesAlgorithms()
If the game related to this problem requires running algorithms, this should return true.
|
addDoppelganger, addGraph, addGraphWithData, addToSelected, addToSelected, addVertex, canRedo, canUndo, checkAndHandlePuzzleCompletion, clearAllSelections, clearHistory, clearTutorial, computeGlobalPoints, connectAllSelectedVertices, connectToSelected, convertMovesToTutorial, copyPuzzleSoItHasInitialStateTheSameAsMyCurrentState, copyRequested, copySelected, createNewVertexForPuzzle, currentPuzzleDataToString, deleteSelected, disableHistory, disconnectFromSelected, disconnectSelected, doNotRecordGraphEvents, enableHistory, endGame, forceRedo, getAttemptName, getBasePoints, getCurrentAnnotation, getCurrentMoveOverview, getCurrentUndoableEvent, getData, getDescription, getDiameter, getDifficultyLevel, getEdgeDataClassName, getEditHelpClassName, getEditorClassName, getFamilyName, getFirstSelected, getFirstTimeBonus, getGameName, getGlobalBest, getGraph, getHelpClassName, getHighScoreBonus, getImprovementBonus, getInstanceClassName, getInterestingTutorialVertices, getMaximumXCoordinate, getMaximumYCoordinate, getMessage, getMinimumSelectedXCoordinate, getMinimumSelectedYCoordinate, getMinimumXCoordinate, getMinimumYCoordinate, getMode, getNumberOfEdges, getNumberOfMoves, getNumberOfVertices, getNumberSelected, getOldHighScore, getPersonalBest, getPlayClassName, getPuzzleID, getPuzzleInstanceName, getPuzzleName, getSelectedVertices, getSolution, getSolutionAsString, getSolutionID, getThemeClassName, getTimeTaken, getTopOfUndoStack, getTutorialData, getUserID, getVertexIndex, getVertices, getVisibility, getVisibleSources, goToNextEvent, grossHistoryDeleteLastEvent, grossHistoryGetLastAddedEvent, grossHistoryGetNextEvent, grossHistoryGetNextEventIndex, grossHistoryIsSaved, grossHistoryIteratorAtBeginning, grossHistoryIteratorAtEnd, grossHistoryNext, grossHistoryPrevious, grossHistorySetSaved, grossHistorySize, grossHistoryToBeginning, grossHistoryToEnd, initialPuzzleDataToString, isFinishable, isInReplayOrEditTutorialMode, isLocked, isLowerScoreBetter, isPlayable, isSaved, isShowIndices, isSpecialCopyOK, isTutorial, isValidToTranslationSelection, isVisibleSource, makeCurrentStateInitialState, moveGraphEnded, moveSelectedVerticesEnded, moveStarted, pasteAndConnectCopyOfSelected, pasteCopyOfSelected, performEvents, performEvents, performTutorialEvents, reallySetLocked, recordGraphEvents, redo, removeFromSelected, removeFromSelected, resetVerticesToInitialLocations, restart, runAlgorithms, runuTryIt, selectAll, sendAlgorithmResult, sendMeaninglessEvent, setAttemptName, setData, setDefaultData, setDescription, setFinishable, setGlobalBest, setGraph, setInReplayOrEditTutorialMode, setLocked, setMessage, setMode, setPersonalBest, setPlayable, setPuzzle, setPuzzleID, setPuzzleName, setSaved, setShowIndices, setSolutionData, setSolutionID, setSolutionInformation, setUserID, setVisibleSources, startTimer, stopTimer, stringToPuzzleData, submit, toggleSelected, tutorialModeEnabled, undo, update, updateTimeTaken
public MultiDesignsInstance()
public MultiDesignsInstance(MultiDesignsInstance g)
g
- public java.util.HashMap<SimpleEdge,java.util.ArrayList<java.lang.Integer>> getCoveredEdges()
public boolean isPermissible(SimpleEdge e)
public boolean arePermissible(java.util.ArrayList<SimpleEdge> edges)
public boolean addSubgraphToSolution(SubGraph sub)
public boolean removeLastSubgraphFromSolution()
public boolean removeSubgraphFromSolution(SubGraph sub)
public int getCurrentSolutionSize()
public int countDuplicateEdges()
public java.util.ArrayList<SimpleEdge> getDuplicateEdgesAsList()
public int getNumberOfUncoveredEdges()
public java.util.ArrayList<Edge> getUncoveredEdges()
public java.util.ArrayList<SimpleEdge> getUncoveredSimpleEdges()
public boolean setType(DesignType type)
type
- public boolean setToleranceAndType(DesignType type, int tol, boolean fireEvent)
public void setTolerance(int tol)
padding
- public int getTolerance()
public boolean isCurrentStateValidSolution()
PuzzleInstance
isCurrentStateValidSolution
in class PuzzleInstance
public PuzzleInstance copyPuzzle()
PuzzleInstance
copyPuzzle
in class PuzzleInstance
public boolean setSubgraphs(java.lang.String names)
public java.lang.String getSubgraphsAsString()
public SubGraph[] getSubgraphs()
public int getScore()
PuzzleInstance
getScore
in class PuzzleInstance
public boolean isEventForThisPuzzleType(Event<?> e)
PuzzleInstance
isEventForThisPuzzleType
in class PuzzleInstance
public boolean isSolutionRefinable()
PuzzleInstance
isSolutionRefinable
in class PuzzleInstance
public boolean usesAlgorithms()
PuzzleInstance
usesAlgorithms
in class PuzzleInstance
public void updateStateBasedOnAlgorithmResult(java.lang.String algorithmResult)
PuzzleInstance
updateStateBasedOnAlgorithmResult
in class PuzzleInstance
algorithmResult
- a boolean that describes the result of the algorithm.public PuzzleInstance getTryItInstanceForUseOnPlayScreen()
PuzzleInstance
getTryItInstanceForUseOnPlayScreen
in class PuzzleInstance
public boolean tryItResultsAreBinding()
PuzzleInstance
tryItResultsAreBinding
in class PuzzleInstance
public void setNoSolution()
public void setSolutionStuff(DesignType type, int tolerance, java.util.ArrayList<SubGraph> sol)
public java.lang.String getProcessedSolution()
getProcessedSolution
in class PuzzleInstance
public java.util.ArrayList<SubGraph> getSolutionSubgraphs()
public VertexData getDefaultVertexDataObject()
getDefaultVertexDataObject
in class PuzzleInstance
public java.lang.String uniqueIdentifier(Vertex v)
PuzzleInstance
uniqueIdentifier
in class PuzzleInstance