Class OrientationCommand


public class OrientationCommand extends ExternalCommand
Returns the current direction that a robot is facing.
  • Constructor Details

    • OrientationCommand

      public OrientationCommand(String robotName)
    • OrientationCommand

      public OrientationCommand(com.google.gson.JsonObject 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
    • execute

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

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

      public String getUsage()
      Description copied from class: ExternalCommand
      Get the way this command is supposed to be used.
      Example for a command foo
      
       #robot-world-client
       > invalid input: '<'foo-usage> invalid input: '<'foo-args>
       
      Specified by:
      getUsage in class ExternalCommand
      Returns:
      the string representation of the usage of this command.