Package fr.formiko.kokcinelo.model
Class Level
java.lang.Object
fr.formiko.kokcinelo.model.Level
Level of the game.
It contains a unique id & fiew useful methods.
- Since:
- 0.2
- Version:
- 1.1
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the draw priority of the level.getId()
static Level
Get a level from its id.Return the next levels.int
Return the creature class that player can play.int
boolean
static Level
newTestLevel
(String id, List<Class<? extends Creature>> playerCreatureClasses, Map<Class<? extends Creature>, Integer> creaturesToSpawn) To use only for testingvoid
setPlayerCreatureClassIndex
(int playerCreatureClassIndex) void
setUnlocked
(boolean unlocked) toString()
Return a string representation of the level.
-
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
-
getLevelList
-
getNumber
public int getNumber() -
getLetter
-
getPlayerCreatureClassIndex
public int getPlayerCreatureClassIndex() -
setPlayerCreatureClassIndex
public void setPlayerCreatureClassIndex(int playerCreatureClassIndex) -
getPlayerCreatureClasses
Return the creature class that player can play. -
getPlayerCreatureClass
-
getLevel
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
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
-
toString
Return a string representation of the level.
-