|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.kosi.model.tournament.KosiMovement
This is the implementation of a simple Bridge-movement. Every pair will play against each other. When the number of pairs is even every pair is playing in every round. With an odd number of pairs there will one pair be waiting in each round.
All pairs will play the same board set simultaneously.
ChangeLog:
$Log: KosiMovement.java,v $ Revision 1.1.1.1 2001/04/29 18:05:18 jiriki Imported sources from zola. Revision 1.8 2001/04/18 10:26:19 login Implemented Test-Case for movements!! Revision 1.7 2001/03/15 20:14:32 login Renamed the class Round to Match Revision 1.6 2001/03/12 18:16:27 login noch nen bug gefunden Revision 1.5 2001/03/12 18:07:35 login Bisschen am movement rumgefeilt Revision 1.4 2001/03/06 18:20:26 login documentation Revision 1.3 2001/03/06 18:16:32 login updated documentation Revision 1.2 2001/03/06 15:14:08 login - documentation
Constructor Summary | |
KosiMovement(java.util.List pairs,
int boardsPerRound)
Creates a KosiMovement instance for the given list of pairs and number of boards per round. |
Method Summary | |
int |
getBoardsPerRound()
Returns the number of boards that one pair will play against the same opponents. |
Match |
getMatch(int round,
int table)
This method calculates the match pairing of two pairs and the respective boards for the given round and table numbers. |
int |
getNumberOfRounds()
Returns the number of rounds that the tournament this movement is for comprises. |
int |
getNumberOfTables()
Returns the number of tables needed for this movement. |
Pair[] |
getWaitingPairs(int round)
The method calculates the pairs that have a break in the given round. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KosiMovement(java.util.List pairs, int boardsPerRound)
pairs
- The list of pairs which are paticipating in the
tournament this movement is made for.boardsPerRound
- The number of boards that one pair is
playing against the same opponents.java.lang.IllegalArgumentException
- If the number of boards per round was less than 1.Method Detail |
public int getNumberOfTables()
getNumberOfTables
in interface Movement
public int getNumberOfRounds()
getNumberOfRounds() * getBoardsPerRound()
.getNumberOfRounds
in interface Movement
public int getBoardsPerRound()
getNumberOfRounds() * getBoardsPerRound()
.getBoardsPerRound
in interface Movement
public Match getMatch(int round, int table)
getMatch
in interface Movement
round
- The number of the round the pairings are calculated
for. Range must be within 1 to getNumberOfRounds()
.table
- The number of the table the pairings are calculated
for. Range must be within 1 to getNumberOfTables()
.java.lang.IllegalArgumentException
- If round or table number are
out of range.public Pair[] getWaitingPairs(int round)
getWaitingPairs
in interface Movement
round
- The number of the round of that the waiting pairs
are to be calculated.java.lang.IllegalArgumentException
- If round or table number are
out of range.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |