public class LevelGenerator extends AbstractLevelGenerator
Constructor and Description |
---|
LevelGenerator(GameDescription game,
ElapsedCpuTimer elpasedTimer)
Initialize all the parameters for the level generator
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateLevel(GameDescription game,
ElapsedCpuTimer elapsedTimer)
generate a level without specifying the width and the height of the level
|
java.lang.String |
generateLevel(GameDescription game,
ElapsedCpuTimer elapsedTimer,
int width,
int length)
Generate a level with a fixed width and length
|
java.util.HashMap<java.lang.Character,java.util.ArrayList<java.lang.String>> |
getLevelMapping()
get the current used level mapping to create the level string
|
public LevelGenerator(GameDescription game, ElapsedCpuTimer elpasedTimer)
game
- game description object that define the current gameelpasedTimer
- the amount of time that the constructor havepublic java.lang.String generateLevel(GameDescription game, ElapsedCpuTimer elapsedTimer, int width, int length)
game
- the current level descriptionelapsedTimer
- the amount of time allowed for generationwidth
- the width of the levellength
- the length of the levelpublic java.lang.String generateLevel(GameDescription game, ElapsedCpuTimer elapsedTimer)
generateLevel
in class AbstractLevelGenerator
game
- the current game description objectelpasedTimer
- the amount of time allowed for generationpublic java.util.HashMap<java.lang.Character,java.util.ArrayList<java.lang.String>> getLevelMapping()
getLevelMapping
in class AbstractLevelGenerator