Jacson

de.spieleck.app.turn
Class Player

java.lang.Object
  extended by de.spieleck.app.turn.Player
All Implemented Interfaces:
java.lang.Comparable

public class Player
extends java.lang.Object
implements java.lang.Comparable

This class could have named "Participant" for higher abstraction, it contains information about name and scoring.
While for many tournaments a player might be a person, for a team bridge tournament, the Player class would probably reflect a pair of persons. But I didn't care to implement Bridge anyway.
XXX The fact that the StandardPlayerRegistry is a embedded class within Player, is quirky and might change sometime.

$URL: https://svn.sourceforge.net/svnroot/jtourney/src/de/spieleck/app/turn/Player.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 Player.StandardPlayerRegistry
           
 
Method Summary
 void addResult(GameResult result)
           
 int compareTo(java.lang.Object o)
           
 PlayerScore getFineScore()
           
 int getId()
           
 java.lang.String getNameKurz()
           
 java.lang.String getNameLang()
           
 int getPlayedAgainst(Player p)
           
 PlayerRegistry getRegistry()
           
 java.lang.String getRemark()
           
 PlayerScore getScore()
           
 boolean isActive()
           
 java.util.Iterator<GameResult> results()
           
 void setScore(PlayerScore ps)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setScore

public void setScore(PlayerScore ps)

getScore

public PlayerScore getScore()

getFineScore

public PlayerScore getFineScore()

getRegistry

public PlayerRegistry getRegistry()

addResult

public void addResult(GameResult result)

getPlayedAgainst

public int getPlayedAgainst(Player p)

results

public java.util.Iterator<GameResult> results()

getId

public int getId()

isActive

public boolean isActive()

getNameLang

public java.lang.String getNameLang()

getNameKurz

public java.lang.String getNameKurz()

getRemark

public java.lang.String getRemark()

toString

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

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

spieleck.de