Class LookClientCommand.LookClientCommandResult

java.lang.Object
za.co.wethinkcode.robots.server.clientCommands.ClientCommandResult
za.co.wethinkcode.robots.server.clientCommands.LookClientCommand.LookClientCommandResult
All Implemented Interfaces:
CommandResult
Enclosing class:
LookClientCommand

public class LookClientCommand.LookClientCommandResult extends ClientCommandResult
Evaluated Result of the look command.
  • Constructor Details

    • LookClientCommandResult

      public LookClientCommandResult(ServerRobot target, WorldState worldState, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • getObstacles

      public ArrayList<LookClientCommand.LookItem> getObstacles()
    • writeToDisk

      public void writeToDisk()
      Allows us to write our output to disk
    • toString

      public String toString()
      Standard toString for developer use
      Specified by:
      toString in interface CommandResult
      Overrides:
      toString in class Object
      Returns:
      Standard String that's developer readable
    • toJson

      public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
      Jackson serialisation string
      Returns:
      JSON string
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • getInternalResponseCode

      public InternalResponseCode getInternalResponseCode()
      Explicitly forces Command Results to return a responseCode
      Returns:
      a response code
    • getImplementedClientCommands

      public ImplementedClientCommands getImplementedClientCommands()
      Return the command that this result was evaluating
      Specified by:
      getImplementedClientCommands in class ClientCommandResult
      Returns:
      which command this is an evaluation of
    • getMessage

      public String getMessage()
      Specified by:
      getMessage in class ClientCommandResult
      Returns:
      the result's message (useful for debugging)