Jacson

de.spieleck.app.turn.scoring
Class BaseScoring

java.lang.Object
  extended by de.spieleck.app.turn.scoring.BaseScoring
All Implemented Interfaces:
LineSourceInited, ScoringMode
Direct Known Subclasses:
Chess, Mue, Zoff

public abstract class BaseScoring
extends java.lang.Object
implements ScoringMode

Abstract base implementation for a ScoringMode.

$URL: https://svn.sourceforge.net/svnroot/jtourney/src/de/spieleck/app/turn/scoring/BaseScoring.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
BaseScoring()
           
 
Method Summary
 PlayerScore add(PlayerScore p1, PlayerGameScore p2)
          Implementers help.
 java.lang.String checkScore(PlayerGameScore[] pgs)
          Return error when scores are not fitting together.
 void init(LineSource ls)
           
 PlayerScore initialValue()
          Implementers help.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.spieleck.app.turn.ScoringMode
addPlayers, adjustScore, parseRawScore, zeroScore
 

Constructor Detail

BaseScoring

public BaseScoring()
Method Detail

init

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

checkScore

public java.lang.String checkScore(PlayerGameScore[] pgs)
Description copied from interface: ScoringMode
Return error when scores are not fitting together. I.e. for chess the sum of all (=2) player scores must be 1 and it can actually only be 1:0, 0.5:0.5 or 0:1.

Specified by:
checkScore in interface ScoringMode

initialValue

public PlayerScore initialValue()
Implementers help. PlayerGameScore subclasses PlayerScore, but sometimes it's the same.

Specified by:
initialValue in interface ScoringMode

add

public PlayerScore add(PlayerScore p1,
                       PlayerGameScore p2)
Implementers help. PlayerGameScore subclasses PlayerScore, but sometimes it's the same.

Specified by:
add in interface ScoringMode

spieleck.de