|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ICardCollection
Defines methods required by a card collection. This collection can be used for a full deck, a discard pile, or an agent's hand.
| Method Summary | |
|---|---|
ICard |
get(int index)
Return the card at the given index. |
ICard |
getFirst()
Return the first card. |
Collection |
getKinds(int minimumCount)
Return a collection of CardCollection s of kinds. |
ICard |
getLast()
Return the last card. |
Collection |
getStraights(int minimumCount)
Return a collection of CardCollection s of straights. |
ICard |
removeFirst()
Remove and return the first card. |
ICard |
removeLast()
Remove and return the last card. |
void |
shuffle()
Randomly reorder the cards. |
void |
sort()
Sort the cards. |
| Methods inherited from interface org.vizzini.game.ITokenCollection |
|---|
clone, configure, findByName, get, get, iterator |
| Methods inherited from interface org.vizzini.util.ICollection |
|---|
toString |
| Methods inherited from interface java.util.Collection |
|---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Method Detail |
|---|
ICard get(int index)
ICard getFirst()
Collection getKinds(int minimumCount)
CardCollection s of kinds. Each
collection will contain at least the given minimum number of cards.
minimumCount - Minimum number of cards required to be considered a
kind.ICard getLast()
Collection getStraights(int minimumCount)
CardCollection s of straights. Each
collection will contain at least the given minimum number of cards.
minimumCount - Minimum number of cards required to be considered a
kind.ICard removeFirst()
ICard removeLast()
void shuffle()
void sort()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |