Class Level

java.lang.Object
fr.formiko.kokcinelo.model.Level

public final class Level extends Object
Level of the game. It contains a unique id & fiew useful methods.
Since:
0.2
Version:
1.1
  • Method Details

    • newTestLevel

      public static Level newTestLevel(String id, List<Class<? extends Creature>> playerCreatureClasses, Map<Class<? extends Creature>,Integer> creaturesToSpawn)
      To use only for testing
    • isUnlocked

      public boolean isUnlocked()
    • setUnlocked

      public void setUnlocked(boolean unlocked)
    • getId

      public String getId()
    • getLevelList

      public static Set<Level> getLevelList()
    • getNumber

      public int getNumber()
    • getLetter

      public String getLetter()
    • getPlayerCreatureClassIndex

      public int getPlayerCreatureClassIndex()
    • setPlayerCreatureClassIndex

      public void setPlayerCreatureClassIndex(int playerCreatureClassIndex)
    • getPlayerCreatureClasses

      public List<Class<? extends Creature>> getPlayerCreatureClasses()
      Return the creature class that player can play.
    • getPlayerCreatureClass

      public Class<? extends Creature> getPlayerCreatureClass()
    • getLevel

      public static Level getLevel(String id)
      Get a level from its id.
      Parameters:
      id - id of the level to get
      Returns:
      the level
    • getDrawPriority

      public int getDrawPriority()
      Get the draw priority of the level.
    • getNextLevels

      public List<Level> getNextLevels()
      Return the next levels.
      If next level haven't been calculated, it calculate it.
      Every level can be unlocked by completing the previous level. Previous level of 3X is 2X if it exist, else 2K.
      Returns:
      a list of the next levels
    • getCreaturesToSpawn

      public Map<Class<? extends Creature>,Integer> getCreaturesToSpawn()
    • toString

      public String toString()
      Return a string representation of the level.
      Overrides:
      toString in class Object