Class LaunchClientCommand.LaunchCommandResult
java.lang.Object
za.co.wethinkcode.robots.server.clientCommands.ClientCommandResult
za.co.wethinkcode.robots.server.clientCommands.LaunchClientCommand.LaunchCommandResult
- All Implemented Interfaces:
Stateful,CommandResult
- Enclosing class:
LaunchClientCommand
public static class LaunchClientCommand.LaunchCommandResult
extends ClientCommandResult
implements Stateful
-
Constructor Summary
ConstructorsConstructorDescriptionLaunchCommandResult(InternalResponseCode responseCode, Exception error) LaunchCommandResult(InternalResponseCode response, ServerRobot robot, WorldState worldState, Position spawn) -
Method Summary
Modifier and TypeMethodDescriptionReturn the command that this result was evaluatingExplicitly forces Command Results to return a responseCodeGetter for the new Robot being madeGet the WorldState that the stateful command was evaluated based on.getSpawn()Getter for the spawn point of a RobotGets the worldState that the robot was launched into.voidAllows us to write our output to diskMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface za.co.wethinkcode.robots.shared.CommandResult
toString
-
Constructor Details
-
Method Details
-
getSpawn
Getter for the spawn point of a Robot- Returns:
- the spawn point of this Robot
-
getNewRobot
Getter for the new Robot being made- Returns:
- get the new Robot
-
getImplementedClientCommands
Return the command that this result was evaluating- Specified by:
getImplementedClientCommandsin classClientCommandResult- Returns:
- which command this is an evaluation of
-
getMessage
- Specified by:
getMessagein classClientCommandResult- Returns:
- the result's message (useful for debugging)
-
getWorldState
Gets the worldState that the robot was launched into.- Returns:
- the worldState that the robot was made in
-
writeToDisk
public void writeToDisk()Allows us to write our output to disk- Specified by:
writeToDiskin interfaceCommandResult
-
getInternalResponseCode
Explicitly forces Command Results to return a responseCode- Specified by:
getInternalResponseCodein interfaceCommandResult- Returns:
- a response code
-
getNextWorldState
Get the WorldState that the stateful command was evaluated based on.- Specified by:
getNextWorldStatein interfaceStateful- Returns:
- the worldState that the commandResult was based on
-