|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--be.madoka.aardbei.sokoban.Logic | +--be.madoka.aardbei.sokoban.logic.SokoLogic
Represents the Logic of a Sokoban game.
Field Summary |
Fields inherited from interface be.madoka.aardbei.sokoban.Direction |
DOWN, INSERT, LEFT, REMOVE, RIGHT, UNDO_LEVEL, UNDO_MOVE, UP |
Constructor Summary | |
SokoLogic()
Default constructor. |
Method Summary | |
boolean |
end()
Ends the game. |
java.lang.String |
getInfo()
Gives some info about this game. |
java.lang.String |
getName()
Gives the name of this game. |
boolean |
move(int direction)
Moves the game in the given direction. |
boolean |
start(java.lang.String playerName,
java.lang.String fileName)
Starts a new game from the given fileName for the given playerName. |
void |
worldEvent(PositionChangeEvent e)
Handles PositionChangeEvents recieved from a World. |
Methods inherited from class be.madoka.aardbei.sokoban.Logic |
addVisualisation, removeVisualisation |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SokoLogic()
Method Detail |
public void worldEvent(PositionChangeEvent e)
e
- the PositionChangeEventpublic java.lang.String getName()
Logic
getName
in class Logic
String
specifying the namepublic java.lang.String getInfo()
Logic
getInfo
in class Logic
String
giving info about this gamepublic boolean move(int direction)
Logic
move
in class Logic
direction
- the direction
boolean
specifying if the move was performed or notpublic boolean start(java.lang.String playerName, java.lang.String fileName)
Logic
start
in class Logic
playerName
- the playerNamefileName
- the filename
boolean
specifying whether the game was started or notpublic boolean end()
Logic
end
in class Logic
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 |