Interface SplittingMode

All Superinterfaces:
All Known Implementing Classes:
BaseSplitter, Chess, Mue, Skat, Zoff

public interface SplittingMode
extends LineSourceInited

Implementations of this are responsible for dividing the number of players into boards or tables.
A SplittingMode for chess tournaments will propose splitting the tourney into pairs of players. The same would happen for team bridge. For a individual bridge tournament however a splitter should suggest splitting players in quadruples.
Implementations of PairingMode should be able to handle the suggested splittings.

$URL: https://svn.sourceforge.net/svnroot/jtourney/src/de/spieleck/app/turn/SplittingMode.java $

$Revision: 2 $ $Date: 2006-03-20 14:33:27 +0100 (Mo, 20 Mrz 2006) $ $Author: nestefan $
Frank S. Nestel, $Author: nestefan $

Method Summary
 int optimal()
          Return optimal playing number.
 int[] split(int total)
          Return a split.
Methods inherited from interface de.spieleck.app.turn.LineSourceInited

Method Detail


int optimal()
Return optimal playing number.
This can be used e.g. for determining a final round of the top-n participants.


int[] split(int total)
Return a split.
That is a[i] is the number of groups of size i. This must satisfy the condition sum(a[i]*i) = total; Well actually sum(a[i]*i) < total is allowed and means that players have to sit out!
Example: Consider 25 players for a game which works with 4 or 5 players. The splitting might either be [0,0,0,0,0,5] suggesting 5 tables with 5 players. But if the game plays better with 4 players, the splitting might better be [0,0,0,0,5,1], that is suggest to distribute the 25 players to 5 tables of 4 players and to 1 table of 5 players.