|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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()
TournamentaddContestant()
clearContestants in interface TournamentTournament.clearContestants()public void addContestant(Player aContestant)
addContestant in interface TournamentaContestant - Player to be added.Tournament.addContestant(com.anji.tournament.Player)public java.util.List playTournament()
Tournament
playTournament in interface TournamentList 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 TournamentTournamentPlayerResults.getTournamentScore() not
TournamentPlayerResults.getScore()Tournament.getMaxScore()public int getMinScore()
getMinScore in interface TournamentTournamentPlayerResults.getTournamentScore() not
TournamentPlayerResults.getScore()Tournament.getMinScore()
public void init(Properties props)
throws java.lang.Exception
aMatch countOpponentResults to true
init in interface Configurableprops - configuration parameters
java.lang.ExceptionConfigurable.init(com.anji.util.Properties)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||