|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--be.madoka.aardbei.sokoban.Logic
Represents the logic of a game.
Constructor Summary | |
Logic()
Default constructor. |
Method Summary | |
void |
addVisualisation(Visualisation vis)
Adds the given Visualisation to the visualisations. |
abstract boolean |
end()
Ends the game. |
abstract java.lang.String |
getInfo()
Gives some info about this game. |
abstract java.lang.String |
getName()
Gives the name of this game. |
abstract boolean |
move(int direction)
Moves the game in the given direction. |
void |
removeVisualisation(Visualisation vis)
Removes the given Visualisation from the visualisations. |
abstract boolean |
start(java.lang.String playerName,
java.lang.String fileName)
Starts a new game from the given fileName for the given playerName. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Logic()
Method Detail |
public void addVisualisation(Visualisation vis)
vis
- the Visualisationpublic void removeVisualisation(Visualisation vis)
vis
- the Visualisationpublic abstract java.lang.String getName()
String
specifying the namepublic abstract java.lang.String getInfo()
String
giving info about this gamepublic abstract boolean move(int direction)
direction
- the direction
boolean
specifying if the move was performed or notpublic abstract boolean start(java.lang.String playerName, java.lang.String fileName)
playerName
- the playerNamefileName
- the filename
boolean
specifying whether the game was started or notpublic abstract boolean end()
boolean
specifying whether the game wa stopped or not
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |