|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.anji.tournament.SingleEliminationTournament
public class SingleEliminationTournament
Standard double elimination tournament, except players are re-seeded after every round. Also, in final round if losers bracket champ beats winners bracket champ, another game is played to determine champ.
Constructor Summary | |
---|---|
SingleEliminationTournament()
default ctor; init() should be called before using this object |
|
SingleEliminationTournament(Game aGame,
ScoringWeights aWeights,
java.util.Random aRand)
ctor Note: this object overrides aMatch countOpponentResults to
true |
Method Summary | |
---|---|
void |
addContestant(Player aContestant)
|
void |
clearContestants()
remove all contestants added via addContestant() |
int |
getMaxRounds()
This isn't precise, but should be greater than or equal to the number of rounds. |
int |
getMaxScore()
Sum of round scores, which start at contestants.size() and double each round |
int |
getMinScore()
|
void |
init(Properties props)
Note: this object overrides aMatch countOpponentResults to true |
java.util.List |
playTournament()
Play full tournament. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleEliminationTournament()
init()
should be called before using this object
public SingleEliminationTournament(Game aGame, ScoringWeights aWeights, java.util.Random aRand)
aMatch
countOpponentResults to
true
aGame
- aWeights
- aRand
- Method Detail |
---|
public void clearContestants()
Tournament
addContestant()
clearContestants
in interface Tournament
Tournament.clearContestants()
public void addContestant(Player aContestant)
addContestant
in interface Tournament
aContestant
- Player
to be added.Tournament.addContestant(com.anji.tournament.Player)
public java.util.List playTournament()
Tournament
playTournament
in interface Tournament
List
contains TournamentPlayerResults
objects, sorted
in descending order of scoreTournament.playTournament()
public int getMaxRounds()
public int getMaxScore()
contestants.size()
and double each round
getMaxScore
in interface Tournament
TournamentPlayerResults.getTournamentScore()
not
TournamentPlayerResults.getScore()
Tournament.getMaxScore()
public int getMinScore()
getMinScore
in interface Tournament
TournamentPlayerResults.getTournamentScore()
not
TournamentPlayerResults.getScore()
Tournament.getMinScore()
public void init(Properties props) throws java.lang.Exception
aMatch
countOpponentResults to true
init
in interface Configurable
props
- configuration parameters
java.lang.Exception
Configurable.init(com.anji.util.Properties)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |