org.dartra.games.golf.visitor
Class GolfStatisticsVisitor
java.lang.Object
org.dartra.games.golf.visitor.GolfStatisticsVisitor
- All Implemented Interfaces:
- GameVisitor
- public class GolfStatisticsVisitor
- extends java.lang.Object
- implements GameVisitor
Game visitor collecting statistics data specific to a GolfGame
- Author:
- Bieke Meeussen
Field Summary |
protected java.util.Hashtable |
playerStats
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
playerStats
protected java.util.Hashtable playerStats
GolfStatisticsVisitor
public GolfStatisticsVisitor(boolean composed)
visitGame
public void visitGame(Game game)
- Description copied from interface:
GameVisitor
Process game data.
- Specified by:
visitGame
in interface GameVisitor
- See Also:
GameVisitor.visitGame(org.dartra.framework.Game)
visitMatch
public void visitMatch(Match match)
- Description copied from interface:
GameVisitor
Process match data.
- Specified by:
visitMatch
in interface GameVisitor
- See Also:
GameVisitor.visitMatch(org.dartra.framework.Match)
getNrHoleInOne
public int getNrHoleInOne(Player player)
getNrBirdie
public int getNrBirdie(Player player)
getNrPerThree
public int getNrPerThree(Player player)
getNrBogey
public int getNrBogey(Player player)
getNrDoubleBogey
public int getNrDoubleBogey(Player player)
getPercentageHoleInOne
public double getPercentageHoleInOne(Player player)
getPercentageBirdie
public double getPercentageBirdie(Player player)
getPercentagePerThree
public double getPercentagePerThree(Player player)
getPercentageBogey
public double getPercentageBogey(Player player)
getPercentageDoubleBogey
public double getPercentageDoubleBogey(Player player)
scoreBoard
public int[] scoreBoard(Player player)