Class LevelsManager

java.lang.Object
pvzclone.model.impl.LevelsManager

public final class LevelsManager extends Object
Class used for Managing Levels in the Game.
  • Constructor Details

    • LevelsManager

      public LevelsManager(int levelNumber)
      Constructor for LevelsManager.
      Parameters:
      levelNumber - number of levels to generate.
  • Method Details

    • getLevelCount

      public int getLevelCount()
      Returns the number of levels.
      Returns:
      the number of levels.
    • createLevel

      public LevelImpl createLevel(int delta)
      Returns a new created level regarding the delta.
      Parameters:
      delta - the index of the level in the list.
      Returns:
      the number of levels.
    • getLevel

      public LevelImpl getLevel(Optional<Integer> index)
      Returns the level at index inside the list.
      Parameters:
      index - the index of the level in the list.
      Returns:
      the level at the given index in the list.
    • getLevelList

      public List<LevelImpl> getLevelList()
      Returns the list of levels.
      Returns:
      the levels list.