Jacson

de.spieleck.app.turn.scoring
Class Zoff

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

public class Zoff
extends BaseScoring

A ScoringMode for a match of Zoff.
During a match of this card games a player obtains both a score and a rank. The rank is the major scoring component, since it depends on the score, but has an additional rule to avoid ties. The table score is however retained for tie breaking of the tournament ranking.

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

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

Nested Class Summary
static class Zoff.ZoffScore
           
 
Constructor Summary
Zoff()
           
 
Method Summary
 PlayerScore addPlayers(PlayerScore ps, PlayerScore pgs)
          Accumulate player total scores to another total for tiebreaking reasons.
 PlayerGameScore[] adjustScore(PlayerGameScore[] pgs)
          Perform adjustments on the playerscores of a game.
 java.lang.String checkScore(PlayerGameScore[] pgs)
          Return error when scores are not fitting together.
 PlayerGameScore parseRawScore(java.lang.String line)
          Parse a single players score from a String.
 java.lang.String toString()
           
 PlayerGameScore zeroScore()
          Generate a zero score for a game with yet no outcome.
 
Methods inherited from class de.spieleck.app.turn.scoring.BaseScoring
add, init, initialValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Zoff

public Zoff()
Method Detail

parseRawScore

public PlayerGameScore parseRawScore(java.lang.String line)
Description copied from interface: ScoringMode
Parse a single players score from a String.


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
Overrides:
checkScore in class BaseScoring

adjustScore

public PlayerGameScore[] adjustScore(PlayerGameScore[] pgs)
Description copied from interface: ScoringMode
Perform adjustments on the playerscores of a game. This is useful for do some normalization of individual scores depending on total scores in a game.


zeroScore

public PlayerGameScore zeroScore()
Description copied from interface: ScoringMode
Generate a zero score for a game with yet no outcome.


addPlayers

public PlayerScore addPlayers(PlayerScore ps,
                              PlayerScore pgs)
Description copied from interface: ScoringMode
Accumulate player total scores to another total for tiebreaking reasons. With the right implementation of chess scores, this results in a Buchholz score.


toString

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

spieleck.de