com.anji.tournament
Interface Tournament

All Known Implementing Classes:
CompositeTournament, DoubleEliminationTournament, SimpleTournament, SingleEliminationTournament

public interface Tournament

Abstract class that manages a list of players, has them play each other in matches, and returns the results. Also returns min and max score.

Author:
Philip Tucker

Method Summary
 void addContestant(Player contestant)
           
 void clearContestants()
          remove all contestants added via addContestant()
 int getMaxScore()
           
 int getMinScore()
           
 java.util.List playTournament()
          Play full tournament.
 

Method Detail

clearContestants

public void clearContestants()
remove all contestants added via addContestant()


addContestant

public void addContestant(Player contestant)
Parameters:
contestant - Player to be added.

playTournament

public java.util.List playTournament()
Play full tournament.

Returns:
List contains TournamentPlayerResults objects, sorted in descending order of score

getMaxScore

public int getMaxScore()
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()

getMinScore

public int getMinScore()
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()