public class LookCommand extends ExternalCommand
The Look command class.

Basics of Command

  • Constructor Details

    • LookCommand

      public LookCommand(String robotName)
      Standard constructor for the look command. Accepts a robot name
      Parameters:
      robotName - the name of the robot that is launching this command
    • LookCommand

      public LookCommand(com.google.gson.JsonObject json)
      Construct a look command from incoming json
      Parameters:
      json - the incoming json.
  • Method Details

    • executeToString

      public String executeToString(World world)
      Description copied from class: Command
      Each command must implement this method It does the work and returns a result
      Specified by:
      executeToString in class Command
    • addLookObjectDetails

      @Deprecated public static com.google.gson.JsonObject addLookObjectDetails(String direction, String description)
      Deprecated.
    • lookObjectType

      @Deprecated public static String lookObjectType(String description)
      Deprecated.
    • lookObjectDistance

      @Deprecated public static int lookObjectDistance(String description)
      Deprecated.
    • execute

      public com.google.gson.JsonObject execute(World world)
      Modern a modern OO implementation of the execute method
      Specified by:
      execute in class Command
      Parameters:
      world -
    • getCommandName

      public ImplementedClientCommands getCommandName()
      Return which client command this command implements
      Specified by:
      getCommandName in class ExternalCommand
      Returns:
      the command this child is
    • getUsage

      public String getUsage()
      Get the way this command is supposed to be used.
      Specified by:
      getUsage in class ExternalCommand
      Returns:
      the string representation of the usage of this command.