edu.ucla.stat.SOCR.games
Class RedBlackGame

java.lang.Object
  extended by edu.ucla.stat.SOCR.core.SOCRValueSettable
      extended by edu.ucla.stat.SOCR.core.MultiplePartsPanel
          extended by edu.ucla.stat.SOCR.core.Game
              extended by edu.ucla.stat.SOCR.games.RedBlackGame
All Implemented Interfaces:
IGame, IValueSettable, Pluginable, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, java.util.Observer

public class RedBlackGame
extends Game
implements java.awt.event.ItemListener

This class models the red-black game. A player plays Bernoulli trials against the house at even stakes until she loses her fortune or reaches a specified target fortune.


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
MultiplePartsPanel.SOCRToolBar
 
Field Summary
 
Fields inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
applet, fName, graphs, mainPane, recordTable, tables, toolbar, toolbar2, toolbars
 
Constructor Summary
RedBlackGame()
          This method initializes the experiment.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          This method handles the events associated with the buttons.
 void itemStateChanged(java.awt.event.ItemEvent event)
          This method handles the choice events assoicated with changing the target fortune.
 void reset()
          This method resets the experiment.
 void resetBet()
          This method resets the bet.
 void resetGame()
          This method resets the game.
 void update(java.util.Observable o, java.lang.Object arg)
          This method handles the scroll events associated with changing the initial fortune or the probability of success.
 
Methods inherited from class edu.ucla.stat.SOCR.core.Game
getAppletInfo, getDisplayPane, getInstance, getOnlineDescription, performAction, setAppletInfo, updateGame
 
Methods inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
addGraph, addTable, addTool, addTool2, addToolbar, format, getMainPanel, getName, getRecordTable, getTextPanel, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, play, removeToolbar, setApplet, setName
 
Methods inherited from class edu.ucla.stat.SOCR.core.SOCRValueSettable
createComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSetters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.ucla.stat.SOCR.core.Pluginable
getName, setApplet
 

Constructor Detail

RedBlackGame

public RedBlackGame()
This method initializes the experiment.

Method Detail

reset

public void reset()
This method resets the experiment.

Specified by:
reset in interface IGame
Overrides:
reset in class Game

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
This method handles the events associated with the buttons.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class Game

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent event)
This method handles the choice events assoicated with changing the target fortune.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener

resetGame

public void resetGame()
This method resets the game.


resetBet

public void resetBet()
This method resets the bet.


update

public void update(java.util.Observable o,
                   java.lang.Object arg)
This method handles the scroll events associated with changing the initial fortune or the probability of success.

Specified by:
update in interface java.util.Observer
Overrides:
update in class MultiplePartsPanel
See Also:
Observer.update(java.util.Observable, java.lang.Object)