public class LevelGenerator extends AbstractLevelGenerator
Modifier and Type | Field and Description |
---|---|
static boolean |
includeBorders
Add Borders to the generated random level
|
Constructor and Description |
---|
LevelGenerator(GameDescription game,
ElapsedCpuTimer elapsedTimer)
Constructor for the RandomLevelGenerator where it initialize the random object used.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateLevel(GameDescription game,
ElapsedCpuTimer elapsedTimer)
Generate a level string randomly contains only one avatar, 80% free space, and 20% of random sprites
|
getLevelMapping
public static boolean includeBorders
public LevelGenerator(GameDescription game, ElapsedCpuTimer elapsedTimer)
game
- Abstract game description object. This object contains all needed information about the current game.elapsedTimer
- Timer to define the maximum amount of time for the constructor.public java.lang.String generateLevel(GameDescription game, ElapsedCpuTimer elapsedTimer)
generateLevel
in class AbstractLevelGenerator
game
- Abstract game description object. This object contains all needed information about the current game.elapsedTimer
- Timer to define the maximum amount of time for the level generation.