Package model.levels
Class Level
java.lang.Object
model.levels.Level
Represents a level data.
The class handles the creation and management of level data, including the level map, wind directions, bubble generator, and enemies.
-
Constructor Summary
ConstructorsConstructorDescriptionLevel(BufferedImage levelMap) Constructs a new Level with the specified level map image. -
Method Summary
Modifier and TypeMethodDescriptionReturns the bubble generator.Returns the list of enemies.protected int[][]Returns the level data.intgetTileSpriteIndex(int x, int y) Returns the sprite index at the specified coordinates.protected Constants.Direction[][]Returns the wind direction data.voidResets the state of the level for a new game session.
-
Constructor Details
-
Level
Constructs a new Level with the specified level map image.- Parameters:
levelMap- the image representing the level map
-
-
Method Details
-
newGameReset
public void newGameReset()Resets the state of the level for a new game session. -
getTileSpriteIndex
public int getTileSpriteIndex(int x, int y) Returns the sprite index at the specified coordinates.- Parameters:
x- the x-coordinatey- the y-coordinate- Returns:
- the sprite index at the specified coordinates
-
getLevelTileData
protected int[][] getLevelTileData()Returns the level data.- Returns:
- the level data
-
getWindDirectionData
Returns the wind direction data.- Returns:
- the wind direction data
-
getBubbleGenerator
Returns the bubble generator.- Returns:
- the bubble generator
-
getEnemies
Returns the list of enemies.- Returns:
- the list of enemies
-