Jacson

de.spieleck.app.turn.splitting
Class Skat

java.lang.Object
  extended by de.spieleck.app.turn.splitting.BaseSplitter
      extended by de.spieleck.app.turn.splitting.Skat
All Implemented Interfaces:
LineSourceInited, SplittingMode

public class Skat
extends BaseSplitter

A SplittingMode for Skat tournaments.
Prefers 3 players, but can use 4 players in a sitout fashion.

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

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

Constructor Summary
Skat()
           
 
Method Summary
 int optimal()
          Return optimal playing number.
 int[] split(int total)
          Return a split.
 
Methods inherited from class de.spieleck.app.turn.splitting.BaseSplitter
init, toString, transposeSplit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Skat

public Skat()
Method Detail

optimal

public int optimal()
Description copied from interface: SplittingMode
Return optimal playing number.
This can be used e.g. for determining a final round of the top-n participants.


split

public int[] split(int total)
Description copied from interface: SplittingMode
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.


spieleck.de