Class RobotCannotActException

java.lang.Object
java.lang.Throwable
java.lang.Exception
za.co.wethinkcode.robots.errors.RobotCannotActException
All Implemented Interfaces:
Serializable

public class RobotCannotActException extends Exception
This exception encapsulates the behaviour of a Robot who cannot act, typically due to a mismatched Status such as Status.DEAD
See Also:
  • Constructor Details

    • RobotCannotActException

      public RobotCannotActException(String message)
      Constructor for a RobotCannotActException for an unclear reason
      Parameters:
      message - the reason the this Robot cannot act
    • RobotCannotActException

      public RobotCannotActException()
    • RobotCannotActException

      public RobotCannotActException(Status s, Robot r, World w)
      Take in the failing Status Robot and World. Return why it cannot act, given it's state
      Parameters:
      s - the current status of the robot
      r - the robot failing to act
      w - the world that the robot is failing to act in