Blackjack

com.amoebacode.blackjack.core
Class Dealer

java.lang.Object
  |
  +--com.amoebacode.blackjack.core.GameObject
        |
        +--com.amoebacode.blackjack.core.Participant
              |
              +--com.amoebacode.blackjack.core.Dealer
All Implemented Interfaces:
IDealer, IGameObject, IParticipant

class Dealer
extends Participant
implements IDealer

Dealer manages the dealer round participant, including the dealer hand.

Version:
0.9
Author:
Jason Gurney

Fields inherited from class com.amoebacode.blackjack.core.Participant
hands
 
Fields inherited from class com.amoebacode.blackjack.core.GameObject
listeners, parent
 
Constructor Summary
protected Dealer(IRound round)
           
 
Method Summary
 void completeHand()
          Completes the dealer hand (called when all players have finished).
private  DealerEventListenerCollection getDealerEventListenerCollection()
          Returns the event listener collection for this dealer.
 IDealerHand getDealerHand()
          Returns the hand for this dealer.
private  void hitUntilComplete()
          Hits the dealer hand until it busts or reaches the minimum stand score.
 void setupFirstHand()
          Sets up the first hand for this participant (called at the beginning of the round) and notifies the GUI listeners.
 
Methods inherited from class com.amoebacode.blackjack.core.Participant
addHand, allHandsBlackjack, clear, getFirstHand, getHandAt, getNumberOfHands, getRound
 
Methods inherited from class com.amoebacode.blackjack.core.GameObject
addEventListener, getEventListenerCollection, getGame, getParent, hasParent, setEventListenerCollection
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface com.amoebacode.blackjack.core.IParticipant
allHandsBlackjack, clear, getFirstHand, getNumberOfHands
 
Methods inherited from interface com.amoebacode.blackjack.core.IGameObject
addEventListener, getGame, getParent
 

Constructor Detail

Dealer

protected Dealer(IRound round)
See Also:
Participant.Participant(IRound)
Method Detail

setupFirstHand

public void setupFirstHand()
Description copied from interface: IParticipant
Sets up the first hand for this participant (called at the beginning of the round) and notifies the GUI listeners.
Specified by:
setupFirstHand in interface IParticipant
See Also:
IParticipant.setupFirstHand()

getDealerHand

public IDealerHand getDealerHand()
Description copied from interface: IDealer
Returns the hand for this dealer.
Specified by:
getDealerHand in interface IDealer
See Also:
IDealer.getDealerHand()

completeHand

public void completeHand()
Description copied from interface: IDealer
Completes the dealer hand (called when all players have finished).
Specified by:
completeHand in interface IDealer
See Also:
IDealer.completeHand()

hitUntilComplete

private void hitUntilComplete()
Hits the dealer hand until it busts or reaches the minimum stand score.

getDealerEventListenerCollection

private DealerEventListenerCollection getDealerEventListenerCollection()
Returns the event listener collection for this dealer.
Returns:
this object's DealerEventListenerCollection

Blackjack

Copyright © 2002 amoebacode.com.