|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--inonit.domain.game.card.hearts.ai.Trick
Information about a particular trick during a Hearts Hand
.
Method Summary | |
Card |
getCardPlayedBy(int index)
Returns the Card played by the Intelligence
at the given player index on this Trick ,
or null if the Intelligence at index has not played a Card
on this Trick yet. |
CardArray |
getCards()
Returns a new CardArray containing the Card s, in order, which have been played in this
Trick . |
Kitty |
getKitty()
Returns the Kitty associated with this Trick , if any. |
int |
getLed()
Returns the player index of the Intelligence
who led, or will lead, this Trick . |
int |
getTook()
Returns the index of the Intelligence which took this
Trick , or -1 if the trick is not over or the information is not known yet
(i.e., Intelligence.trickEnded has not been
invoked yet). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public int getLed()
Intelligence
who led, or will lead, this Trick
.Intelligence
who led, or will lead, this trick.public CardArray getCards()
CardArray
containing the Card
s, in order, which have been played in this
Trick
.CardArray
containing the Card
s, in order, which have been played in
this Trick
. Will be empty if no Card
s have been played yet. The CardArray
which is returned can be safely manipulated without altering the original.public int getTook()
Intelligence
which took this
Trick
, or -1
if the trick is not over or the information is not known yet
(i.e., Intelligence.trickEnded
has not been
invoked yet).Intelligence
which took this trick, or -1
if the
Trick
has not been taken yet or the Intelligence
taking it is not known.public Card getCardPlayedBy(int index)
Card
played by the Intelligence
at the given player index on this Trick
,
or null
if the Intelligence
at index
has not played a Card
on this Trick
yet.index
- A player index, with 0 indicating this AbstractIntelligence
, 1 indicating the
Intelligence
to this AbstractIntelligence
's left, and so forth.Card
played by the Intelligence
specified by index
, or
null
if that Intelligence
has not yet played a Card
in this
Trick
.public Kitty getKitty()
Kitty
associated with this Trick
, if any. A Kitty
will be associated
with the Trick
if:
Kitty
in this game
(see Rules.getKittySize
), and
Trick
was the first Trick
in this Hand
to contain a scoring
Card
,
i.e., a Card
with a non-zero value
as defined by Rules.getValue(CardArray)
Kitty
which was added to this Trick
when it was taken, or null
if
this Trick
does not have an associated Kitty
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |