com.anji.tournament
Class KRandomOppsTournament
java.lang.Object
com.anji.tournament.SimpleTournament
com.anji.tournament.KRandomOppsTournament
- All Implemented Interfaces:
- Configurable, Tournament
- public class KRandomOppsTournament
- extends SimpleTournament
- implements Configurable
Each subject plays at least k games against a random set of opponents. Does not count
opponent results (i.e., the k opponents chosen for each contestant each round).
- Author:
- Philip Tucker
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KRandomOppsTournament
public KRandomOppsTournament()
- default ctor; object must be initialized with
init()
KRandomOppsTournament
public KRandomOppsTournament(Game aGame,
int aK,
ScoringWeights aWeights,
java.util.Random aRand)
- Note: this object overrides
aMatch
countOpponentResults to false
- Parameters:
aGame
- aWeights
- aK
- number of opponents for each subjectaRand
- random number generator
init
public void init(Properties props)
throws java.lang.Exception
- Specified by:
init
in interface Configurable
- Overrides:
init
in class SimpleTournament
- Parameters:
props
-
- Throws:
java.lang.Exception
- See Also:
Configurable.init(com.anji.util.Properties)
hasNextPlayerPair
protected boolean hasNextPlayerPair()
- Specified by:
hasNextPlayerPair
in class SimpleTournament
- Returns:
- boolean true if player pairs are stil available
- See Also:
SimpleTournament.hasNextPlayerPair()
nextPlayerPair
protected SimpleTournament.PlayerPair nextPlayerPair()
- Specified by:
nextPlayerPair
in class SimpleTournament
- Returns:
- next pair of players
- See Also:
SimpleTournament.nextPlayerPair()
startTournament
protected void startTournament()
- Description copied from class:
SimpleTournament
- restart tournament
- Specified by:
startTournament
in class SimpleTournament
- See Also:
SimpleTournament.startTournament()
getMaxScore
public int getMaxScore()
- Specified by:
getMaxScore
in interface Tournament
- Returns:
- maximum possible score a contestant can achieve in this tournament; this value may
change as contestants are added; refers to
TournamentPlayerResults.getTournamentScore()
not
TournamentPlayerResults.getScore()
- See Also:
Tournament.getMaxScore()
getMinScore
public int getMinScore()
- Specified by:
getMinScore
in interface Tournament
- Returns:
- minimum possible score a contestant can achieve in this tournament; this value may
change as contestants are added; refers to
TournamentPlayerResults.getTournamentScore()
not
TournamentPlayerResults.getScore()
- See Also:
Tournament.getMinScore()
endTournament
protected void endTournament()
- Description copied from class:
SimpleTournament
- end tournament
- Specified by:
endTournament
in class SimpleTournament
- See Also:
SimpleTournament.endTournament()