Class LookClientCommand
java.lang.Object
za.co.wethinkcode.robots.server.clientCommands.LookClientCommand
- All Implemented Interfaces:
ClientCommand,Command
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassEvaluated Result of the look command.static final recordRecord Class that stores a thing being looked at from some target's position -
Constructor Summary
ConstructorsConstructorDescriptionLookClientCommand(LookCommandRequest lookCommandRequest) Standard constructor for the Look command from a client before evaluationLookClientCommand(LookCommandRequest lookCommandRequest, WorldState worldState, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Standard constructor for the Look 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
-
LookClientCommand
Standard constructor for the Look command from a client before evaluation- Parameters:
lookCommandRequest- the request for it to be executed
-
LookClientCommand
public LookClientCommand(LookCommandRequest lookCommandRequest, WorldState worldState, com.fasterxml.jackson.databind.ObjectMapper objectMapper) throws NoSuchRobotException Standard constructor for the Look command from a client before evaluation- Parameters:
lookCommandRequest- 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
-