Enum Class RobotKind

java.lang.Object
java.lang.Enum<RobotKind>
za.co.wethinkcode.robots.domain.RobotKind
All Implemented Interfaces:
Serializable, Comparable<RobotKind>, Constable

public enum RobotKind extends Enum<RobotKind>
The Robot Kind Enum encapsulates all the different possible types of robot we can expect to encounter
  • Enum Constant Details

    • REGGIE

      public static final RobotKind REGGIE
      Reggie the default bot type. Has 3 shields, a max ammo of 3, and a shot distance of 3
    • APOLLO

      public static final RobotKind APOLLO
      Apollo the Scout bot. Has 2 shields, a max ammo of 5, and a shot distance of 5
    • JUGGERNAUT

      public static final RobotKind JUGGERNAUT
      Juggernaut the Tank bot. Has 5 shields, a max ammo of 2, and a shot distance of 4
    • WHISPER

      public static final RobotKind WHISPER
      Whisper the sniper bot. Has 1 shield, and can shoot 1 shot a distance of 10
    • KAMAKAZE

      public static final RobotKind KAMAKAZE
      Bomber bot. Has 4 shields and Uses mines instead of shots
    • QUICKBOT

      public static final RobotKind QUICKBOT
    • BOOM

      public static final RobotKind BOOM
      Little bomber
  • Method Details

    • values

      public static RobotKind[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RobotKind valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getWeapon

      public WeaponKind getWeapon()
      Getter for the WeaponKind this RobotKind uses
    • getShields

      public int getShields()
      Getter for this robot's shield
      Returns:
      the number of shields
    • getAmmo

      public int getAmmo()
      Getter for this robot's ammunition
      Returns:
      the starter ammo size of this robot
    • getShotDistance

      public int getShotDistance()
      Getter for how far this robot can shoot
      Returns:
      the shot distance of this robot.
    • getMineType

      public Optional<MineType> getMineType()
      Returns:
      the variant of mine this RobotKind use (typically associated with a MineType.damage)
      Throws:
      NullPointerException - explicitly if this RobotKind does not have a mine
    • getClientIcon

      public String getClientIcon()
      Returns:
      Getter for the icon used to stylishly represent this client