|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--Map | +--Tutorial
The Tutorial is an illustration of how Sokoban is to be played.
The format for a tutorial step file is:
[Description]
This is a step description.
[Move]
UP
DOWN
LEFT
RIGHT
Fields inherited from class Map |
level, loading, robots |
Constructor Summary | |
Tutorial(Game owner)
Initializes the tutorial and loads the first step. |
Method Summary | |
int |
getCurrentStep()
Returns the number of the current step. |
java.lang.String[] |
getDescription()
Returns an array of Strings describing the current step. |
void |
getLastStep()
Sets the current step to the previous step and then calls loadStep. |
void |
getNextStep()
Sets the current step to the next step and then calls loadStep. |
void |
loadStep()
Loads the current step's description and moves. |
void |
showStep()
Calls the instantReplay() method and then saves the board to the tempLevel file. |
Methods inherited from class Map |
addRobot, calculateScore, changeLevel, getMap, getRobot, getRobots, getTime, instantReplay, isPaused, moveRobot, pauseTimer, removeRobot, restartLevel, setTimer, startTimer, toStringArray, undoMove |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Tutorial(Game owner)
Method Detail |
public void loadStep()
Loads the current step's description and moves.
Pre-condition:nonepublic void showStep()
Calls the instantReplay() method and then saves the board to the tempLevel file.
Pre-condition:a tutorial step has been loadedpublic void getNextStep()
public void getLastStep()
public java.lang.String[] getDescription()
public int getCurrentStep()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |