com.anji.tournament
Class ScoringWeights
java.lang.Object
com.anji.tournament.ScoringWeights
- All Implemented Interfaces:
- Configurable
- public class ScoringWeights
- extends java.lang.Object
- implements Configurable
- Author:
- Philip Tucker
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ScoringWeights
public ScoringWeights(int aWinValue,
int aLossValue,
int aTieValue,
float aRawScoreValue)
- Parameters:
aWinValue
- must be >= 0, >=aLossValue
, and >=aTieValue
aLossValue
- must be <=aTieValue
and <=aWinValue
aTieValue
- must be <=aWinValue
and >=aLossValue
aRawScoreValue
-
ScoringWeights
public ScoringWeights()
- default constructor
init
public void init(Properties props)
- Specified by:
init
in interface Configurable
- Parameters:
props
- configuration parameters- See Also:
Configurable.init(com.anji.util.Properties)
getLossValue
public int getLossValue()
- Returns:
- loss weight
getTieValue
public int getTieValue()
- Returns:
- tie weight
getWinValue
public int getWinValue()
- Returns:
- win weight
calculateTotalScore
public float calculateTotalScore(PlayerStats results)
- Parameters:
results
-
- Returns:
- weighted score
calculateAverageScore
public float calculateAverageScore(PlayerStats results)
- Parameters:
results
-
- Returns:
- average weighted score per game
getRawScoreValue
public float getRawScoreValue()
- Returns:
- raw score weight
toString
public java.lang.String toString()
- See Also:
Object.toString()