java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----LetsMakeADealApplet
This is a simple applet that lets someone play the classic three door game from Let's Make a Deal. A prize is hidden behind one door. The player chooses one by clicking on it. Another door is then revealed to hold a booby prize. The player can then choose to keep either what's behind the door she selected or the other unopened door.
This applet keeps track of the win & loss statistics for the two strategies of play (stay with selected door/switch to other door). It also has autoplay capability, so you can quickly see how the resulting statistics.
There are three parameters that can be set in the APPLET tag:
 
 LetsMakeADealApplet()
  LetsMakeADealApplet()
   
 action(Event, Object)
  action(Event, Object)
   autoPlay()
  autoPlay()
   chooseFirstDoor(int)
  chooseFirstDoor(int)
   clearEverything()
  clearEverything()
   gameLogic(int)
  gameLogic(int)
   imageCanvasEvent(ImageCanvas)
  imageCanvasEvent(ImageCanvas)
   init()
  init()
   initGame()
  initGame()
   paint(Graphics)
  paint(Graphics)
   updateStats()
  updateStats()
   updateStayLose()
  updateStayLose()
   updateStayWin()
  updateStayWin()
   updateSwitchLose()
  updateSwitchLose()
   updateSwitchWin()
  updateSwitchWin()
   
 LetsMakeADealApplet
LetsMakeADealApplet
public LetsMakeADealApplet()
 
 init
init
public void init()
 paint
paint
public void paint(Graphics g)
 initGame
initGame
public void initGame()
 updateStayWin
updateStayWin
public void updateStayWin()
 updateStayLose
updateStayLose
public void updateStayLose()
 updateSwitchWin
updateSwitchWin
public void updateSwitchWin()
 updateSwitchLose
updateSwitchLose
public void updateSwitchLose()
 updateStats
updateStats
public void updateStats()
 clearEverything
clearEverything
public void clearEverything()
 chooseFirstDoor
chooseFirstDoor
public void chooseFirstDoor(int door)
 gameLogic
gameLogic
public void gameLogic(int door)
 autoPlay
autoPlay
public void autoPlay()
 imageCanvasEvent
imageCanvasEvent
public void imageCanvasEvent(ImageCanvas source)
gameLogic.I know, it breaks encapsulation. So sue me.
 action
action
 public boolean action(Event event,
                       Object arg)