robocode.control.snapshot
Enum MineState

java.lang.Object
  extended by java.lang.Enum<MineState>
      extended by robocode.control.snapshot.MineState
All Implemented Interfaces:
Serializable, Comparable<MineState>

public enum MineState
extends Enum<MineState>


Enum Constant Summary
EXPLODING
          The mine currently represents a ship explosion, i.e. a ship death.
FLOATING
           
HIT_MINE
           
HIT_VICTIM
           
INACTIVE
          The mine is currently inactive.
PLACED
          The bullet has just been placed this turn and hence just been created.
 
Method Summary
 int getValue()
          Returns the state as an integer value.
 boolean isActive()
           
static MineState toState(int value)
          Returns a BulletState based on an integer value that represents a BulletState.
static MineState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MineState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PLACED

public static final MineState PLACED
The bullet has just been placed this turn and hence just been created. This state only last one turn.


FLOATING

public static final MineState FLOATING

HIT_VICTIM

public static final MineState HIT_VICTIM

EXPLODING

public static final MineState EXPLODING
The mine currently represents a ship explosion, i.e. a ship death.


HIT_MINE

public static final MineState HIT_MINE

INACTIVE

public static final MineState INACTIVE
The mine is currently inactive. Hence, it is not active or visible on the battlefield.

Method Detail

values

public static MineState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MineState c : MineState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MineState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

getValue

public int getValue()
Returns the state as an integer value.

Returns:
an integer value representing this state.
See Also:
toState(int)

toState

public static MineState toState(int value)
Returns a BulletState based on an integer value that represents a BulletState.

Parameters:
value - the integer value that represents a specific BulletState.
Returns:
a BulletState that corresponds to the specific integer value.
Throws:
IllegalArgumentException - if the specified value does not correspond to a BulletState and hence is invalid.
See Also:
getValue()

isActive

public boolean isActive()


Copyright © 2015 Robocode. All Rights Reserved.