Jadex 0.96

jadex.examples.blackjack
Class GameStatistics

java.lang.Object
  extended by jadex.examples.blackjack.GameStatistics

public class GameStatistics
extends Object

This class holds all necessary information, that might be shown on the StatisticGraph.


Field Summary
 SimplePropertyChangeSupport pcs
          The helper object for bean events.
 
Constructor Summary
GameStatistics()
          The constructor initialises the class-variables
 
Method Summary
 void addGameRound(Dealer dealer, Player[] players)
          This method is called by the master plan whenever a game has finished.
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
 int getMaximum()
          returns highest-account-status of either a player or the dealer
 int getMaxRound()
          returns maximum roundNumber
 int getMinimum()
          returns lowest-account-status of either a player or the dealer
 Iterator getPlayers()
          return all the player-names
 int[] getXArray(Player player)
          returns an array with roundNumbers, either of an player or of the dealer
 int[] getYArray(Player player)
          returns an array with account-stati, either of an player or of the dealer
 boolean isDataAvailable()
          Is statistical data available ?
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a PropertyChangeListener from the listener list.
 void setShowDealer(boolean show)
          This method is called by the actionPerformed-method of the StatisticGraph-object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pcs

public SimplePropertyChangeSupport pcs
The helper object for bean events.

Constructor Detail

GameStatistics

public GameStatistics()
The constructor initialises the class-variables

Method Detail

setShowDealer

public void setShowDealer(boolean show)
This method is called by the actionPerformed-method of the StatisticGraph-object.


addGameRound

public void addGameRound(Dealer dealer,
                         Player[] players)
This method is called by the master plan whenever a game has finished. The new data is added and the graph's minimum and maximum is recalculated.


getPlayers

public Iterator getPlayers()
return all the player-names


isDataAvailable

public boolean isDataAvailable()
Is statistical data available ?

Returns:
flag indicating if data is available

getXArray

public int[] getXArray(Player player)
returns an array with roundNumbers, either of an player or of the dealer


getYArray

public int[] getYArray(Player player)
returns an array with account-stati, either of an player or of the dealer


getMaxRound

public int getMaxRound()
returns maximum roundNumber


getMaximum

public int getMaximum()
returns highest-account-status of either a player or the dealer


getMinimum

public int getMinimum()
returns lowest-account-status of either a player or the dealer


addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.

Parameters:
listener - The PropertyChangeListener to be added.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Parameters:
listener - The PropertyChangeListener to be removed.

Jadex 0.96

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.