com.amoebacode.blackjack.display
Class DeckDisplay
java.lang.Object
|
+--com.amoebacode.blackjack.display.DisplayElement
|
+--com.amoebacode.blackjack.display.DeckDisplay
- All Implemented Interfaces:
- BlackjackEventListener, DeckEventListener, java.util.EventListener
- public class DeckDisplay
- extends DisplayElement
- implements DeckEventListener
DeckDisplay displays the shoe of cards and the number of decks left.
- Version:
- 0.9
- Author:
- Jason Gurney
|
Method Summary |
void |
drawDeck(IDeck deck)
Draws the deck, including the blank card and the decks remaining label. |
int |
getXPos()
Returns the horizontal position of this deck. |
int |
getYPos()
Returns the vertical position of this deck. |
void |
updateDecksLabel(BlackjackEvent event)
Updates the remaining decks label with the current number of decks
remaining. |
private void |
updateDecksLabel(IDeck deck)
Updates the label indicating the number of decks left. |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
decksLabel
private LabelWrapper decksLabel
- The label tracking the number of decks remaining
cardsLabel
private javax.swing.JLabel cardsLabel
- The deck blank card label
DeckDisplay
protected DeckDisplay(GameDisplay game)
- Default protected constructor.
- Parameters:
game - the GameDisplay parent
drawDeck
public void drawDeck(IDeck deck)
- Draws the deck, including the blank card and the decks remaining label.
updateDecksLabel
public void updateDecksLabel(BlackjackEvent event)
- Description copied from interface:
DeckEventListener
- Updates the remaining decks label with the current number of decks
remaining.
- Specified by:
updateDecksLabel in interface DeckEventListener
- See Also:
DeckEventListener.updateDecksLabel(BlackjackEvent)
updateDecksLabel
private void updateDecksLabel(IDeck deck)
- Updates the label indicating the number of decks left.
- Parameters:
deck - the IDeck being displayed
getXPos
public int getXPos()
- Returns the horizontal position of this deck.
- Returns:
- this deck's horizontal position
getYPos
public int getYPos()
- Returns the vertical position of this deck.
- Returns:
- this deck's vertical position
Copyright © 2002 amoebacode.com.