org.dartra.standard.visitor
Class ScoreBoardVisitor

java.lang.Object
  extended byorg.dartra.standard.visitor.ScoreBoardVisitor
All Implemented Interfaces:
GameVisitor

public class ScoreBoardVisitor
extends java.lang.Object
implements GameVisitor

Visitor to gather score board data from a game-match tree.

Author:
Erwin Vervaet

Constructor Summary
ScoreBoardVisitor()
           
 
Method Summary
 int getMaxLevel()
          Returns the level number for the game-match tree.
 Score getScoreAtLevel(Player player, int level)
          Return the score for given player at specified level of the game-match tree.
 void visitGame(Game game)
          Process game data.
 void visitMatch(Match match)
          Process match data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScoreBoardVisitor

public ScoreBoardVisitor()
Method Detail

visitGame

public void visitGame(Game game)
Description copied from interface: GameVisitor

Process game data.

Specified by:
visitGame in interface GameVisitor

visitMatch

public void visitMatch(Match match)
Description copied from interface: GameVisitor

Process match data.

Specified by:
visitMatch in interface GameVisitor

getScoreAtLevel

public Score getScoreAtLevel(Player player,
                             int level)

Return the score for given player at specified level of the game-match tree.


getMaxLevel

public int getMaxLevel()

Returns the level number for the game-match tree. For instance, for a game/set/match system, this would be 2.