com.asdf.plugins.pokergames
Class Hand

java.lang.Object
  extended by com.asdf.plugins.pokergames.Hand

public class Hand
extends java.lang.Object

container for cards

Author:
rimpila

Constructor Summary
Hand()
          constructor for an empty hand
Hand(Hand hand)
          Constructor for copying a hand
Hand(ParserHand info)
          constructor
 
Method Summary
 void addCard(Card card1)
          add given card to the hand
 boolean containsCard(Card crd)
           
 Card getCard(int pos)
           
 java.util.ArrayList<Card> getCards()
           
 void removeCard()
           
 void removeCard(int index)
          remove card from the given index
 void setCards(java.util.ArrayList<Card> cards)
          Put the given list of cards to be this hand
 int size()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hand

public Hand()
constructor for an empty hand


Hand

public Hand(ParserHand info)
constructor

Parameters:
info -

Hand

public Hand(Hand hand)
Constructor for copying a hand

Parameters:
hand -
Method Detail

containsCard

public boolean containsCard(Card crd)
Parameters:
crd - card asked for
Returns:
true id hand contains the asked card

addCard

public void addCard(Card card1)
add given card to the hand

Parameters:
card1 - card to add

getCard

public Card getCard(int pos)
Parameters:
pos -
Returns:
card in the given position in the hand

size

public int size()
Returns:
number of cards in the hand

getCards

public java.util.ArrayList<Card> getCards()
Returns:
list of cards

setCards

public void setCards(java.util.ArrayList<Card> cards)
Put the given list of cards to be this hand

Parameters:
cards -

removeCard

public void removeCard()

removeCard

public void removeCard(int index)
remove card from the given index

Parameters:
index -