rlgamekit.map.generators
Class AbstractMapGenerator
java.lang.Object
rlgamekit.map.generators.AbstractMapGenerator
- All Implemented Interfaces:
- MapGenerator
- Direct Known Subclasses:
- Dungeon, MinesGenerator, WildernessGenerator
public abstract class AbstractMapGenerator
- extends java.lang.Object
- implements MapGenerator
Base class for map generators, containing mostly configuration
and helper routines which many generators need.
|
Method Summary |
protected int |
getInt(java.util.Properties props,
java.lang.String key,
int def)
Parse a configuration code into an int value. |
protected int |
getInt(java.lang.String value,
int def)
Parse a configuration code into an int value. |
protected int[] |
getIntegers(java.util.Properties props,
java.lang.String key,
int def)
Get an array of int values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractMapGenerator
public AbstractMapGenerator()
getIntegers
protected int[] getIntegers(java.util.Properties props,
java.lang.String key,
int def)
- Get an array of int values.
getInt
protected int getInt(java.util.Properties props,
java.lang.String key,
int def)
- Parse a configuration code into an int value. The configuration code
can be number or a character + color pair, denoted like #r or +r with the
character code being the first character, and the color code being the second.
- Parameters:
props - The config file values.key - The key to look updef - The default avlue to return if the key was not found.
- Returns:
- The integer value parsed from the config data
- See Also:
ColorCodes
getInt
protected int getInt(java.lang.String value,
int def)
- Parse a configuration code into an int value. The configuration code
can be number or a character + color pair, denoted like #r or +r with the
character code being the first character, and the color code being the second.
- Parameters:
value - The config file value.def - The default value to return if the key was not found.
- Returns:
- The integer value parsed from the config data
- See Also:
ColorCodes