mauda
Class Difficulties
java.lang.Object
mauda.Difficulties
public class Difficulties
- extends java.lang.Object
Holds the different difficulties and maps them to strings
and vice versa.
- Author:
- Markus Krebs
|
Method Summary |
static java.lang.String |
getGUIString(int d)
Converts a difficulty-id to a string-representation which
can be used in a GUI, e.g. menus or buttons |
static int |
getID(java.lang.String s)
Converts a string-representation of a difficulty to its id |
static java.lang.String |
getString(int d)
Converts a specific difficulty to string-representation,
that can be stored in an xml-file |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNKNOWN
public static final int UNKNOWN
- See Also:
- Constant Field Values
EASY
public static final int EASY
- See Also:
- Constant Field Values
MEDIUM
public static final int MEDIUM
- See Also:
- Constant Field Values
HARD
public static final int HARD
- See Also:
- Constant Field Values
DIFFICULTY_LEVELS
public static final int DIFFICULTY_LEVELS
- See Also:
- Constant Field Values
Difficulties
public Difficulties()
getString
public static java.lang.String getString(int d)
- Converts a specific difficulty to string-representation,
that can be stored in an xml-file
- Parameters:
d - id of the difficulty
- Returns:
- a string-representation of the difficulty
getID
public static int getID(java.lang.String s)
- Converts a string-representation of a difficulty to its id
- Parameters:
s - string-representation of the difficulty
- Returns:
- id of the difficulty
getGUIString
public static java.lang.String getGUIString(int d)
- Converts a difficulty-id to a string-representation which
can be used in a GUI, e.g. menus or buttons
- Parameters:
d - id of the difficulty
- Returns:
- string-representation