java.lang.Object
com.adventure.config.ApplicationConfig
- All Implemented Interfaces:
Config
Class that implements configuration object.
-
Constructor Summary
ConstructorsConstructorDescriptionApplicationConfig(Properties properties) Creates configuration object from a properties. -
Method Summary
Modifier and TypeMethodDescriptionApp title getter;Default setting folderintDefault display height.intDefault display width.doubleGets the probability that a monster attacks during a fight.doubleGets the probability that a monster dodges during a fight.intMax dodges for the player.Default player stats getter.Properties getter.Gets storage service.Gets type of storage service.booleanTells if the window is resizable or not.
-
Constructor Details
-
ApplicationConfig
Creates configuration object from a properties.- Parameters:
properties- Application properties loaded.- Throws:
ConfigurationException- If some error occur while generating the configuration object.
-
-
Method Details
-
getDisplayWidth
public int getDisplayWidth()Description copied from interface:ConfigDefault display width.- Specified by:
getDisplayWidthin interfaceConfig- Returns:
- Initial display width.
-
getConfigFolder
Description copied from interface:ConfigDefault setting folder- Specified by:
getConfigFolderin interfaceConfig- Returns:
- The path (relative to the .jar) where saves and setting are contained
-
getDisplayHeight
public int getDisplayHeight()Description copied from interface:ConfigDefault display height.- Specified by:
getDisplayHeightin interfaceConfig- Returns:
- Initial display height.
-
isResizable
public boolean isResizable()Description copied from interface:ConfigTells if the window is resizable or not.- Specified by:
isResizablein interfaceConfig- Returns:
- True if the window is resizable, false otherwise.
-
getStorageServiceType
Description copied from interface:ConfigGets type of storage service.- Specified by:
getStorageServiceTypein interfaceConfig- Returns:
- Type of the current storage service.
-
getStorageService
Description copied from interface:ConfigGets storage service.- Specified by:
getStorageServicein interfaceConfig- Returns:
- Current storage service.
-
getMonsterAttackProbability
public double getMonsterAttackProbability()Description copied from interface:ConfigGets the probability that a monster attacks during a fight.- Specified by:
getMonsterAttackProbabilityin interfaceConfig- Returns:
- Monster attack probability.
-
getMonsterDodgeProbability
public double getMonsterDodgeProbability()Description copied from interface:ConfigGets the probability that a monster dodges during a fight.- Specified by:
getMonsterDodgeProbabilityin interfaceConfig- Returns:
- Monster dodges during a fight.
-
getAppTitle
Description copied from interface:ConfigApp title getter;- Specified by:
getAppTitlein interfaceConfig- Returns:
- Default app title.
-
getPlayerStats
Description copied from interface:ConfigDefault player stats getter.- Specified by:
getPlayerStatsin interfaceConfig- Returns:
- Default player stats.
-
getPlayerMaxDodges
public int getPlayerMaxDodges()Description copied from interface:ConfigMax dodges for the player.- Specified by:
getPlayerMaxDodgesin interfaceConfig- Returns:
- Max dodges for the player.
-
getProperties
Description copied from interface:ConfigProperties getter.- Specified by:
getPropertiesin interfaceConfig- Returns:
- Current properties.
-