Package za.co.wethinkcode.robots.domain
Enum Class RobotKind
- All Implemented Interfaces:
Serializable,Comparable<RobotKind>,Constable
The Robot Kind Enum encapsulates all the different possible types of robot we can expect to encounter
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintgetAmmo()Getter for this robot's ammunitionintGetter for this robot's shieldintGetter for how far this robot can shootGetter for theWeaponKindthisRobotKindusesstatic RobotKindReturns the enum constant of this class with the specified name.static RobotKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REGGIE
Reggie the default bot type. Has 3 shields, a max ammo of 3, and a shot distance of 3 -
APOLLO
Apollo the Scout bot. Has 2 shields, a max ammo of 5, and a shot distance of 5 -
JUGGERNAUT
Juggernaut the Tank bot. Has 5 shields, a max ammo of 2, and a shot distance of 4 -
WHISPER
Whisper the sniper bot. Has 1 shield, and can shoot 1 shot a distance of 10 -
KAMAKAZE
Bomber bot. Has 4 shields and Uses mines instead of shots -
QUICKBOT
-
BOOM
Little bomber
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getWeapon
Getter for theWeaponKindthisRobotKinduses -
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
- Returns:
- the variant of mine this
RobotKinduse (typically associated with aMineType.damage) - Throws:
NullPointerException- explicitly if thisRobotKinddoes not have a mine
-
getClientIcon
- Returns:
- Getter for the icon used to stylishly represent this client
-