de.spieleck.app.turn.splitting
Class Mue
java.lang.Object
de.spieleck.app.turn.splitting.BaseSplitter
de.spieleck.app.turn.splitting.Mue
- All Implemented Interfaces:
- LineSourceInited, SplittingMode
public class Mue
- extends BaseSplitter
SplittingMode for Mü.
Mü can be played with 4,5 or 6 players. 5 is optimal.
6 is probably better than for, since it can be played in
a 5 + sitout fashion instead of really 6. But if there are
to many 6-player tables, the splitter switches to replace
4 6 player tables to 1 4 player and 4 5 player tables.
$URL: https://svn.sourceforge.net/svnroot/jtourney/src/de/spieleck/app/turn/splitting/Mue.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 |
Mue()
|
Method Summary |
int |
optimal()
Return optimal playing number. |
int[] |
split(int total)
Return a split. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Mue
public Mue()
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.