java.lang.Object
com.adventure.commands.AbstractCommand
com.adventure.commands.CmdMove
- All Implemented Interfaces:
Command
Command used by the player to move inside the game graph.
-
Field Summary
Fields inherited from class com.adventure.commands.AbstractCommand
args, BUSY_WAITING_QUANTUM, context, inputStream, logger, shouldTerminate, writer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes the command.Gets possible args for current command.protected void
moveToTarget
(StoryNodeLink link) Methods inherited from class com.adventure.commands.AbstractCommand
askConfirmation, correctArgumentsNumber, disableDummyCommands, disableSaveAll, enableDummyCommands, getArgs, getContext, getInputStream, getWriter, kill, reEnableSaved, safeReadNext, safeReadNextLine, setArgs, setContext, setInputStream, setWriter
-
Constructor Details
-
CmdMove
public CmdMove()
-
-
Method Details
-
execute
Description copied from interface:Command
Executes the command.- Throws:
InterruptedException
- Thrown if the command is interrupted (e.g. when kill is well implemented).
-
moveToTarget
-
getPossibleArgs
Description copied from class:AbstractCommand
Gets possible args for current command.- Specified by:
getPossibleArgs
in interfaceCommand
- Specified by:
getPossibleArgs
in classAbstractCommand
- Returns:
- all possible directions for the player
-