Blackjack

com.amoebacode.blackjack.display
Class PlayerDisplay

java.lang.Object
  |
  +--com.amoebacode.blackjack.display.DisplayElement
        |
        +--com.amoebacode.blackjack.display.ParticipantDisplay
              |
              +--com.amoebacode.blackjack.display.PlayerDisplay
All Implemented Interfaces:
BlackjackEventListener, java.util.EventListener, PlayerEventListener

public class PlayerDisplay
extends ParticipantDisplay
implements PlayerEventListener

PlayerDisplay displays the player object, including the player hand displays.

Version:
0.9
Author:
Jason Gurney

Fields inherited from class com.amoebacode.blackjack.display.ParticipantDisplay
handDisplay
 
Fields inherited from class com.amoebacode.blackjack.display.DisplayElement
parent
 
Constructor Summary
protected PlayerDisplay(RoundDisplay round)
          Default protected constructor.
 
Method Summary
 void addPlayerHand(BlackjackEvent event)
          Adds a hand to this player display object.
 void displayNetGain(BlackjackEvent event)
          Displays the net gain for this player display object.
 PlayerHandDisplay getPlayerHandDisplayAt(int index)
          Returns the player hand display at the specified index.
 void performDisplayNetGainAction(IPlayer player)
          Plays the audio clip corresponding to the specified player's net gain and resumes the queue.
private  void setupDisplayElements()
          Sets up the hand display elements for this player.
 
Methods inherited from class com.amoebacode.blackjack.display.ParticipantDisplay
addHandDisplay, getHandDisplayAt
 
Methods inherited from class com.amoebacode.blackjack.display.DisplayElement
executeGameCommand, getDisplayManager, getGameDisplay, getParent, hasParent, playGameClip, queueAction, resumeQueue
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

PlayerDisplay

protected PlayerDisplay(RoundDisplay round)
Default protected constructor.
Parameters:
round - the parent RoundDisplay
Method Detail

setupDisplayElements

private void setupDisplayElements()
Sets up the hand display elements for this player.

getPlayerHandDisplayAt

public PlayerHandDisplay getPlayerHandDisplayAt(int index)
Returns the player hand display at the specified index.
Parameters:
index - the index of the hand to return
Returns:
the PlayerHandDisplay

addPlayerHand

public void addPlayerHand(BlackjackEvent event)
Description copied from interface: PlayerEventListener
Adds a hand to this player display object.
Specified by:
addPlayerHand in interface PlayerEventListener
See Also:
PlayerEventListener.addPlayerHand(BlackjackEvent)

displayNetGain

public void displayNetGain(BlackjackEvent event)
Description copied from interface: PlayerEventListener
Displays the net gain for this player display object.
Specified by:
displayNetGain in interface PlayerEventListener
See Also:
PlayerEventListener.displayNetGain(BlackjackEvent)

performDisplayNetGainAction

public void performDisplayNetGainAction(IPlayer player)
Plays the audio clip corresponding to the specified player's net gain and resumes the queue.
Parameters:
player - the IPlayer being displayed

Blackjack

Copyright © 2002 amoebacode.com.