de.kosi.model.tournament
Class PairTournamentImpl
java.lang.Object
|
+--de.kosi.model.tournament.TournamentImpl
|
+--de.kosi.model.tournament.PairTournamentImpl
- All Implemented Interfaces:
- PairTournament, java.rmi.Remote, java.io.Serializable, Tournament
- public class PairTournamentImpl
- extends TournamentImpl
- implements PairTournament
This class is the implementation of a pair tournament.
ChangeLog:
$Log: PairTournamentImpl.java,v $
Revision 1.6 2001/08/16 12:32:46 betacarotine
guppi
Revision 1.5 2001/08/16 09:14:46 betacarotine
added a pair creation mechanism to the pair tournament
Revision 1.4 2001/08/02 10:44:30 jiriki
Worked on Tournament
Revision 1.3 2001/08/02 10:09:16 betacarotine
Started implementing the preparetion of a tournament (form pairs etc.)
- Version:
- $Revision: 1.6 $ ($Date: 2001/08/16 12:32:46 $)
- Author:
- PG KoSI, Fachbereich Informatik, Universitaet Oldenburg
- See Also:
- Serialized Form
Methods inherited from class de.kosi.model.tournament.TournamentImpl |
addTournamentListener, appealToJudge, checkAccess, getApplicationDeadline, getChatChannel, getMatchTimeout, getOwnerName, getStartDate, getStatus, init, isOwner, removeTournamentListener, setApplicationDeadline, setMatchTimeout, setStartDate, setUserGame, start |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.kosi.model.tournament.Tournament |
addTournamentListener, getApplicationDeadline, getChatChannel, getMatchTimeout, getOwnerName, getStartDate, getStatus, isOwner, removeTournamentListener, setApplicationDeadline, setMatchTimeout, setStartDate |
PairTournamentImpl
public PairTournamentImpl()
throws java.rmi.RemoteException
register
public void register(java.lang.String desiredPartner,
int desiredDirection)
throws InvalidSessionException
- Register. If to Players indicate that they want to play with each other, a pair is formed.
- Specified by:
register
in interface PairTournament
- Parameters:
desiredPartner
- Desired partner for this tournament.desiredDirection
- One of the constants NORTH_EAST or SOUTH_WEST.- Throws:
java.rmi.RemoteException
- If the remote call fails.
unregister
public void unregister()
throws InvalidSessionException
- Unregister.
- Specified by:
unregister
in interface PairTournament
- Throws:
java.rmi.RemoteException
- If the remote call fails.
prepare
public void prepare()
- Overrides:
prepare
in class TournamentImpl
getResult
public PairResult getResult()
- Get the result of the tournament.
- Specified by:
getResult
in interface PairTournament
- Returns:
- Result.
- Throws:
java.rmi.RemoteException
- If the remote call fails.
getConfiguration
public TournamentConfiguration getConfiguration()
throws InvalidSessionException,
KosiAccessException
- Get the configuration for this tournament.
- Specified by:
getConfiguration
in interface Tournament
- Returns:
- The tournament configuration.
- Throws:
java.rmi.RemoteException
- If the remote call fails.InvalidSessionException
- If this method was called fromKosiAccessException
- If not called by the owner of this tournament.
createMovement
public Movement createMovement()
- Creates the movement for this tournament.
- Overrides:
createMovement
in class TournamentImpl
- Returns:
- A new Movement.
setBoardsPerRound
public void setBoardsPerRound(int bpr)
getBoardsPerRound
public int getBoardsPerRound()
calculateResults
public void calculateResults()
- Calculate the Result of the tournament.
- Overrides:
calculateResults
in class TournamentImpl
gameFinished
public void gameFinished(Result result)
- Called by the game when it has just been finished.
- Parameters:
result
- The result of the game.