public class MonsterMetrics extends Object
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
exitAfterArgs
Flag to escape after parsing arguments.
|
(package private) int |
MAX_LEVEL |
(package private) int |
MAX_MATCH |
(package private) int |
NUM_FIGHTS |
(package private) Monster |
selectMonster
Single monster option for measurement.
|
Constructor and Description |
---|
MonsterMetrics()
Basic constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
exitAfterArgs()
Should we exit after parsing arguments?
|
static void |
main(String[] args)
Main application method.
|
(package private) int |
matchFight(Function<Integer,Double> winRatioFunc)
Search for a matched fight based on some parameter.
|
(package private) int |
matchMonsterToFighters(Monster monster,
int level)
Match fighters of given level to monster of one type.
|
(package private) Character |
newFighter(int level)
Create a new fighter of the indicated level.
|
void |
parseArgs(String[] args)
Parse arguments.
|
void |
printUsage()
Print usage.
|
(package private) double |
ratioMonstersBeatFighters(Monster monsterType,
int monsterNumber,
int fighterLevel,
int fighterNumber,
boolean invert)
Find the probability that these monsters beat these fighters.
|
(package private) void |
reportAllMonsters()
Report number of fighters at each level to match all monsters.
|
void |
reportMonsters()
Report monster metrics as selected.
|
(package private) void |
reportOneMonster(Monster monster)
Report number of fighters at each level to match one monster.
|
final int MAX_LEVEL
final int MAX_MATCH
final int NUM_FIGHTS
Monster selectMonster
boolean exitAfterArgs
public void printUsage()
public void parseArgs(String[] args)
public boolean exitAfterArgs()
public void reportMonsters()
void reportAllMonsters()
void reportOneMonster(Monster monster)
int matchMonsterToFighters(Monster monster, int level)
monster
- Type of monster.level
- Level of fighter.int matchFight(Function<Integer,Double> winRatioFunc)
winRatioFunc
- Must be increasing in parameter.double ratioMonstersBeatFighters(Monster monsterType, int monsterNumber, int fighterLevel, int fighterNumber, boolean invert)
invert
- If true, returns chance of fighters beating monsters.Character newFighter(int level)
public static void main(String[] args)