inonit.domain.game.card.hearts.ai
Class Pass

java.lang.Object
  |
  +--inonit.domain.game.card.hearts.ai.Pass

public class Pass
extends java.lang.Object

An object representing a single pass of cards to or from a single player.


Method Summary
 Card getCard(int index)
          Returns the card at a particular index position in this pass.
 CardArray getCards()
          Returns the set of cards included in this pass.
 int getPlayer(int index)
          Returns the player who passed/received the card at a particular index in this pass.
 int getSize()
          Returns the number of cards in this pass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCards

public CardArray getCards()
Returns the set of cards included in this pass.
Returns:
A CardArray containing all the cards included in this Pass.

getSize

public int getSize()
Returns the number of cards in this pass.
Returns:
The number of cards included in this pass.

getCard

public Card getCard(int index)
Returns the card at a particular index position in this pass.
Parameters:
index - A position between 0 and getSize()-1, inclusive.
Returns:
The card at position index in this pass. Indices are zero-based.

getPlayer

public int getPlayer(int index)
Returns the player who passed/received the card at a particular index in this pass.
Parameters:
index - A position between 0 and getSize()-1, inclusive.
Returns:
The relative index of the player who received the card at position index.