Class ClientRobot

java.lang.Object
za.co.wethinkcode.robots.client.clientRobot.ClientRobot
All Implemented Interfaces:
Argument, Robot
Direct Known Subclasses:
BoringClientBot

public abstract class ClientRobot extends Object implements Robot, Argument
Abstract parent class of all clients on the robot's side
  • Constructor Details

    • ClientRobot

      public ClientRobot(String name)
      Constructor for a client Robot based on its name
      Parameters:
      name - name of the robot getting made
    • ClientRobot

      public ClientRobot(String name, RobotKind robotKind)
      Dynamic constructor for a clientRobot
      Parameters:
      name - name of the robot
      robotKind - what kind of robot it is
  • Method Details

    • setStatus

      public void setStatus(RobotStatus robotStatus)
      Setter for the robot's status
      Parameters:
      robotStatus - a name RobotStatus
    • getRobotStatus

      public RobotStatus getRobotStatus()
      Getter for a robot's status
      Specified by:
      getRobotStatus in interface Robot
      Returns:
      name of the robot
    • getRobotKind

      public RobotKind getRobotKind()
      Standard getter for Client Robot's kind
      Specified by:
      getRobotKind in interface Robot
      Returns:
      what kind of robot this robot is
    • getName

      public String getName()
      Getter for a Client Robot's name
      Specified by:
      getName in interface Robot
      Returns:
    • equals

      public boolean equals(Object o)
      allows Direct Comparison between Server Robot and Client Robot
      Overrides:
      equals in class Object
      Parameters:
      o - objects being compared
      Returns:
      if they are truly equal
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object