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

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

public class Hand
extends java.lang.Object

Information about a particular hand within a Game, in the sense of a complete deal and play of all the cards, not in the sense of the cards that a player is holding.


Method Summary
 Trick getCurrentTrick()
          Returns the current Trick in this Hand.
 CardArray getHandDealt()
          Returns a copy of the CardArray that was dealt to this AbstractIntelligence during this Hand.
 CardArray getPassReceived()
          Returns a copy of the pass received from another player during the pass stage of this Hand.
 CardArray getPassSent()
          Returns a copy of the pass sent to another player during the pass stage of this Hand.
 Trick[] getPreviousTricks()
          Returns the previous Tricks which have taken place during this Hand.
 int[] getScores()
          Returns a copy of the scores for this Hand.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHandDealt

public CardArray getHandDealt()
Returns a copy of the CardArray that was dealt to this AbstractIntelligence during this Hand.
Returns:
A CardArray containing the Cards that were dealt to this AbstractIntelligence at the beginning of this Hand. This CardArray is a copy of the original and can be safely manipulated without damaging the original.

getPassSent

public CardArray getPassSent()
Returns a copy of the pass sent to another player during the pass stage of this Hand.
Returns:
A CardArray containing the Cards that were sent away during the pass stage of this Hand, or null if cards have not been passed yet. In the event that this is a "hold" hand, the result of this method is undefined.

getPassReceived

public CardArray getPassReceived()
Returns a copy of the pass received from another player during the pass stage of this Hand.
Returns:
A CardArray containing the Cards that were received during the pass stage of this Hand, or null if cards have not been passed yet. In the event that this is a "hold" hand, the result of this method is undefined.

getPreviousTricks

public Trick[] getPreviousTricks()
Returns the previous Tricks which have taken place during this Hand.
Returns:
An array containing the previous Tricks which have taken place in this Hand. If no Tricks have been completed, this array will be zero-length.

getCurrentTrick

public Trick getCurrentTrick()
Returns the current Trick in this Hand.
Returns:
The current Trick, or null if there is no current Trick. There is no current Trick if the first Trick has not started, or if the last Trick is over.

getScores

public int[] getScores()
Returns a copy of the scores for this Hand.
Returns:
A copy of the scores for this Hand, or null if the Hand has not yet been scored. This array can safely be manipulated without affecting the original.