Class StateClientCommand
java.lang.Object
za.co.wethinkcode.robots.server.clientCommands.StateClientCommand
- All Implemented Interfaces:
ClientCommand,Command
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionStateClientCommand(StateCommandRequest request) StateClientCommand(StateCommandRequest req, WorldState worldState, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Standard constructor for the state command from a client before evaluation -
Method Summary
Modifier and TypeMethodDescriptionexecute(Map<String, Argument> args, WorldState worldState) execute(ServerRobot target, Map<String, Argument> args, WorldState worldState) Overload of execute method that supports passing in a robot as the target for a command
-
Constructor Details
-
StateClientCommand
-
StateClientCommand
public StateClientCommand(StateCommandRequest req, WorldState worldState, com.fasterxml.jackson.databind.ObjectMapper objectMapper) throws NoSuchRobotException Standard constructor for the state command from a client before evaluation- Parameters:
req- the request for it to be executedworldState- the current worldState it is being executed onobjectMapper- the standard object mapper- Throws:
NoSuchRobotException
-
-
Method Details
-
execute
-
execute
Description copied from interface:ClientCommandOverload of execute method that supports passing in a robot as the target for a command- Specified by:
executein interfaceClientCommand- Parameters:
target- the target that this command will be executed onargs- arguments for this CommandworldState- the current state of the world- Returns:
- an immutable evaluation of the command
-