Jacson

de.spieleck.app.turn.splitting
Class BaseSplitter

java.lang.Object
  extended by de.spieleck.app.turn.splitting.BaseSplitter
All Implemented Interfaces:
LineSourceInited, SplittingMode
Direct Known Subclasses:
Chess, Mue, Skat, Zoff

public abstract class BaseSplitter
extends java.lang.Object
implements SplittingMode

Abstract base for programming SplittingMode's.
Also contains the static transposeSplit(int[]) API to convert Splittings from one format to another.

$URL: https://svn.sourceforge.net/svnroot/jtourney/src/de/spieleck/app/turn/splitting/BaseSplitter.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
BaseSplitter()
           
 
Method Summary
 void init(LineSource ls)
           
 java.lang.String toString()
           
static int[] transposeSplit(int[] split)
          "Transposes" a split from the counted to the seated format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.spieleck.app.turn.SplittingMode
optimal, split
 

Constructor Detail

BaseSplitter

public BaseSplitter()
Method Detail

init

public void init(LineSource ls)
          throws java.io.IOException
Specified by:
init in interface LineSourceInited
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

transposeSplit

public static int[] transposeSplit(int[] split)
"Transposes" a split from the counted to the seated format. That is [0,2,1] becomes [1,1,2]. That is [0,0,2,3] becomes [2,2,3,3,3]. That is [0,0,0,0,2,6] becomes [4,4,5,5,5,5,5,5].


spieleck.de