Blackjack

com.amoebacode.blackjack.core
Interface ICardCollection

All Superinterfaces:
IGameObject
All Known Subinterfaces:
IDealerHand, IDeck, IHand, IPlayerHand
All Known Implementing Classes:
CardCollection

public interface ICardCollection
extends IGameObject

ICardCollection defines the standard API for a collection of cards.

Version:
0.9
Author:
Jason Gurney

Method Summary
 void addCard(ICard card)
          Adds the specified card to this collection and notifies the GUI listeners.
 Card getCardAt(int index)
          Returns the card at the specified index.
 Card getNextCard()
          Removes and returns the first card in this collection and notifies the GUI listeners.
 int getNumberOfCards()
          Returns the number of cards in this collection.
 void setCards(java.util.List cards)
          Sets the list of cards appearing in this collection and notifies the GUI listeners.
 
Methods inherited from interface com.amoebacode.blackjack.core.IGameObject
addEventListener, getGame, getParent
 

Method Detail

getCardAt

public Card getCardAt(int index)
Returns the card at the specified index.
Parameters:
index - the index of the card to retrieve
Returns:
the specified Card

getNumberOfCards

public int getNumberOfCards()
Returns the number of cards in this collection.
Returns:
the size of this collection

getNextCard

public Card getNextCard()
Removes and returns the first card in this collection and notifies the GUI listeners.
Returns:
the first card in this collection

setCards

public void setCards(java.util.List cards)
Sets the list of cards appearing in this collection and notifies the GUI listeners.
Parameters:
cards - the new List of cards for this collection

addCard

public void addCard(ICard card)
Adds the specified card to this collection and notifies the GUI listeners.
Parameters:
card - the ICard to add to this collection

Blackjack

Copyright © 2002 amoebacode.com.