001    ///////////////////////////////////////////////////////////////////////////////
002    // Copyright (c) 2006, Frank S. Nestel, All Rights Reserved.
003    //
004    // This library is free software; you can redistribute it and/or
005    // modify it under the terms of the GNU Lesser General Public
006    // License as published by the Free Software Foundation; either
007    // version 2.1 of the License, or (at your option) any later version.
008    //
009    // This library is distributed in the hope that it will be useful,
010    // but WITHOUT ANY WARRANTY; without even the implied warranty of
011    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012    // GNU General Public License for more details.
013    //
014    // You should have received a copy of the GNU Lesser General Public
015    // License along with this program; if not, write to the Free Software
016    // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
017    ///////////////////////////////////////////////////////////////////////////////
018    
019    package de.spieleck.app.turn.pairing;
020    
021    import de.spieleck.app.turn.PairingMode;
022    
023    /**
024     * Base class to simplify creation of a PairingMode.
025     * 
026     * <p><a href="$URL: https://svn.sourceforge.net/svnroot/jtourney/src/de/spieleck/app/turn/pairing/BasePairing.java $">$URL: https://svn.sourceforge.net/svnroot/jtourney/src/de/spieleck/app/turn/pairing/BasePairing.java $</a></p>
027     *
028     * @author Frank S. Nestel
029     * @author $Author: nestefan $
030     * @version $Revision: 2 $ $Date: 2006-03-20 14:33:27 +0100 (Mo, 20 Mrz 2006) $ $Author: nestefan $
031     */
032    public abstract class BasePairing
033        implements PairingMode
034    {
035        public int init(String[] args, int first)
036        {
037            return first;
038        }
039    
040        public static int sum(int[] splitting)
041        {
042            int gameCount = 0;
043            for(int i = 0; i < splitting.length; i++)
044                gameCount += splitting[i];
045            return gameCount;
046        }
047    }