cz.cuni.amis.pogamut.defcon.consts
Enum GameSpeed
java.lang.Object
java.lang.Enum<GameSpeed>
cz.cuni.amis.pogamut.defcon.consts.GameSpeed
- All Implemented Interfaces:
- Serializable, Comparable<GameSpeed>
public enum GameSpeed
- extends Enum<GameSpeed>
One of the game options. Might be accessed through GameInfo#GetOptionValue()
,
GameOption
and GameInfo#getGameSpeed()
.
- Author:
- Radek 'Black_Hand' Pibil
Method Summary |
static GameSpeed |
getEnum(int factor)
|
static GameSpeed |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static GameSpeed[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
PAUSED
public static final GameSpeed PAUSED
REALTIME
public static final GameSpeed REALTIME
SLOW
public static final GameSpeed SLOW
MEDIUM
public static final GameSpeed MEDIUM
FAST
public static final GameSpeed FAST
factor
public final int factor
values
public static GameSpeed[] 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 (GameSpeed c : GameSpeed.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static GameSpeed 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
getEnum
public static GameSpeed getEnum(int factor)
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.