Class OrientationCommand
java.lang.Object
za.co.wethinkcode.robots.server.commands.Command
za.co.wethinkcode.robots.server.commands.external.ExternalCommand
za.co.wethinkcode.robots.server.commands.external.OrientationCommand
Returns the current direction that a robot is facing.
-
Constructor Summary
ConstructorsConstructorDescriptionOrientationCommand(com.google.gson.JsonObject json) OrientationCommand(String robotName) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonObjectModern a modern OO implementation of the execute methodexecuteToString(World world) Each command must implement this method It does the work and returns a resultReturn which client command this command implementsgetUsage()Get the way this command is supposed to be used.Methods inherited from class za.co.wethinkcode.robots.server.commands.external.ExternalCommand
getArgsMethods inherited from class za.co.wethinkcode.robots.server.commands.Command
findRobot, getRobotName
-
Constructor Details
-
OrientationCommand
-
OrientationCommand
public OrientationCommand(com.google.gson.JsonObject json)
-
-
Method Details
-
executeToString
Description copied from class:CommandEach command must implement this method It does the work and returns a result- Specified by:
executeToStringin classCommand
-
execute
Description copied from class:CommandModern a modern OO implementation of the execute method -
getCommandName
Description copied from class:ExternalCommandReturn which client command this command implements- Specified by:
getCommandNamein classExternalCommand- Returns:
- the command this child is
-
getUsage
Description copied from class:ExternalCommandGet the way this command is supposed to be used.Example for a command foo#robot-world-client > invalid input: '<'foo-usage> invalid input: '<'foo-args>- Specified by:
getUsagein classExternalCommand- Returns:
- the string representation of the usage of this command.
-