Package jadex.bdi.examples.blackjack
Class GameStatistics
- java.lang.Object
- 
- jadex.bdi.examples.blackjack.GameStatistics
 
- 
 public class GameStatistics extends java.lang.ObjectThis class holds all necessary information, that might be shown on the StatisticGraph.
- 
- 
Field SummaryFields Modifier and Type Field Description SimplePropertyChangeSupportpcsThe helper object for bean events.
 - 
Constructor SummaryConstructors Constructor Description GameStatistics()The constructor initialises the class-variables
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGameRound(Dealer dealer, Player[] players)This method is called by the master plan whenever a game has finished.voidaddPropertyChangeListener(PropertyChangeListener listener)Add a PropertyChangeListener to the listener list.intgetMaximum()returns highest-account-status of either a player or the dealerintgetMaxRound()returns maximum roundNumberintgetMinimum()returns lowest-account-status of either a player or the dealerjava.util.IteratorgetPlayers()return all the player-namesint[]getXArray(Player player)returns an array with roundNumbers, either of an player or of the dealerint[]getYArray(Player player)returns an array with account-stati, either of an player or of the dealerbooleanisDataAvailable()Is statistical data available ?voidremovePropertyChangeListener(PropertyChangeListener listener)Remove a PropertyChangeListener from the listener list.voidsetShowDealer(boolean show)This method is called by the actionPerformed-method of the StatisticGraph-object.
 
- 
- 
- 
Field Detail- 
pcspublic SimplePropertyChangeSupport pcs The helper object for bean events.
 
- 
 - 
Method Detail- 
setShowDealerpublic void setShowDealer(boolean show) This method is called by the actionPerformed-method of the StatisticGraph-object.
 - 
addGameRoundpublic 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.
 - 
getPlayerspublic java.util.Iterator getPlayers() return all the player-names
 - 
isDataAvailablepublic boolean isDataAvailable() Is statistical data available ?- Returns:
- flag indicating if data is available
 
 - 
getXArraypublic int[] getXArray(Player player) returns an array with roundNumbers, either of an player or of the dealer
 - 
getYArraypublic int[] getYArray(Player player) returns an array with account-stati, either of an player or of the dealer
 - 
getMaxRoundpublic int getMaxRound() returns maximum roundNumber
 - 
getMaximumpublic int getMaximum() returns highest-account-status of either a player or the dealer
 - 
getMinimumpublic int getMinimum() returns lowest-account-status of either a player or the dealer
 - 
addPropertyChangeListenerpublic 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.
 
 - 
removePropertyChangeListenerpublic 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.
 
 
- 
 
-