de.kosi.model.tournament
Interface Movement

All Known Implementing Classes:
KosiMovement

public interface Movement

This is the interface to movements for Bridge tournaments. The implementation must manage the number of tables, of rounds and of boards per round. Furthermore one method has to be implemented which calculates the pairing and respective board set for a specific table in a specific round. We assume that there will be only one waiting pair be possible in a definite round.

ChangeLog:

 $Log: Movement.java,v $
 Revision 1.1.1.1  2001/04/29 18:05:18  jiriki
 Imported sources from zola.

 Revision 1.5  2001/04/18 10:26:20  login
 Implemented Test-Case for movements!!

 Revision 1.4  2001/03/15 20:14:32  login
 Renamed the class Round to Match

 Revision 1.3  2001/03/12 18:07:35  login
 Bisschen am movement rumgefeilt

 Revision 1.2  2001/03/06 15:42:06  login
 updated dox


 

Version:
$Revision: 1.1.1.1 $ ($Date: 2001/04/29 18:05:18 $)
Author:
Timo, Niklas, Ole

Method Summary
 int getBoardsPerRound()
          This method returns the number of boards per round - that is how many games will one pair play against the same opponents.
 Match getMatch(int round, int table)
          This method returns the pairing and respective board set played at the given table in the given round.
 int getNumberOfRounds()
          This method returns the number of rounds.
 int getNumberOfTables()
          This method returns the number of tables needed.
 Pair[] getWaitingPairs(int round)
          This method returns the pairs which are waiting in the given round.
 

Method Detail

getNumberOfTables

public int getNumberOfTables()
This method returns the number of tables needed.
Returns:
The number of tables (0 .. number of pairs / 2).

getNumberOfRounds

public int getNumberOfRounds()
This method returns the number of rounds.
Returns:
The number of rounds (>= 0).

getBoardsPerRound

public int getBoardsPerRound()
This method returns the number of boards per round - that is how many games will one pair play against the same opponents.
Returns:
The number of boards per round (>= 1).

getMatch

public Match getMatch(int round,
                      int table)
This method returns the pairing and respective board set played at the given table in the given round.
Parameters:
round - The round number.
table - The table number.
Returns:
The pairing and respective board set.
Throws:
java.lang.IllegalArgumentException - If round or table number are out of range.

getWaitingPairs

public Pair[] getWaitingPairs(int round)
This method returns the pairs which are waiting in the given round.
Parameters:
round - The round number.
Returns:
An array of waiting pairs. If no pair is waiting, an array of length zero will be returned. The array entries may never be null.
Throws:
java.lang.IllegalArgumentException - If round or table number are out of range.