All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.lotspiech.poker.BunchOfCards

java.lang.Object
   |
   +----com.lotspiech.poker.BunchOfCards

public class BunchOfCards
extends Object
implements Serializable
This is the underlying class for both a hand of cards and a deck of cards. It keeps statistics on what types of cards are in the "bunch". It does not keep the order of the cards.

Copyright 2001, 2002 by Jeffrey B. Lotspiech. This program is open source; it is licensed under the Common Public License Version 0.5.

Author:
Jeffrey B. Lotspiech
See Also:
Hand, Deck, Card

Variable Index

 o cardHere
 o COPYRIGHT
 o count
 o jokers
 o ranks
 o suits
 o wildHere
 o wildRank
 o wilds

Constructor Index

 o BunchOfCards()
 o BunchOfCards(Card[])

Method Index

 o addCard(Card)
 o addCards(Card[])
 o getWildRank()
 o hasCard(Card)
 o hasCard(int, int)
 o numberRank(int)
 o numberSuit(int)
 o numberWilds()
 o removeCard(Card)
 o removeCards(BunchOfCards)
 o removeCards(Card[])
 o setWildRank(int)
 o size()
Number of cards in the "bunch".
 o toString()

Variables

 o COPYRIGHT
 private static final String COPYRIGHT
 o ranks
 protected int ranks[]
 o suits
 protected int suits[]
 o cardHere
 protected int cardHere[][]
 o count
 protected int count
 o jokers
 protected int jokers
 o wilds
 protected int wilds
 o wildRank
 protected int wildRank
 o wildHere
 protected int wildHere[]

Constructors

 o BunchOfCards
 public BunchOfCards()
 o BunchOfCards
 public BunchOfCards(Card cards[])

Methods

 o addCard
 public void addCard(Card card)
 o addCards
 protected void addCards(Card cards[])
 o getWildRank
 public int getWildRank()
 o hasCard
 public boolean hasCard(int suit,
                        int rank)
 o hasCard
 public boolean hasCard(Card c)
 o numberRank
 public int numberRank(int rank)
 o numberSuit
 public int numberSuit(int suit)
 o numberWilds
 public int numberWilds()
 o removeCard
 public void removeCard(Card card) throws LogicException
 o removeCards
 public void removeCards(Card cards[]) throws Exception
 o removeCards
 public void removeCards(BunchOfCards b) throws Exception
 o setWildRank
 public void setWildRank(int rank)
 o size
 public int size()
Number of cards in the "bunch".

 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index