Package model.levels

Class Level

java.lang.Object
model.levels.Level

public class Level extends Object
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 Details

    • Level

      public Level(BufferedImage levelMap)
      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-coordinate
      y - the y-coordinate
      Returns:
      the sprite index at the specified coordinates
    • getLevelTileData

      protected int[][] getLevelTileData()
      Returns the level data.
      Returns:
      the level data
    • getWindDirectionData

      protected Constants.Direction[][] getWindDirectionData()
      Returns the wind direction data.
      Returns:
      the wind direction data
    • getBubbleGenerator

      public BubbleGenerator getBubbleGenerator()
      Returns the bubble generator.
      Returns:
      the bubble generator
    • getEnemies

      public ArrayList<EnemyModel> getEnemies()
      Returns the list of enemies.
      Returns:
      the list of enemies