jskat.data
Class Trick

java.lang.Object
  extended by jskat.data.Trick

public class Trick
extends java.lang.Object

Holds data for a single trick

Author:
Jan Schäfer

Constructor Summary
Trick(int foreHand)
          Creates a new instance of Trick
 
Method Summary
 Card getCard(int player)
          Gets a card from the trick
 CardVector getCardVector()
          Returns the cards of the trick as CardVector
 Card getFirstCard()
          Getter for property firstCard.
 int getForeHand()
           
 Card getSecondCard()
          Getter for property secondCard.
 Card getThirdCard()
          Getter for property thirdCard.
 int getTrickWinner()
          Getter for property trickWinner.
 void setFirstCard(Card firstCard)
          Setter for property firstCard.
 void setSecondCard(Card secondCard)
          Setter for property secondCard.
 void setThirdCard(Card thirdCard)
          Setter for property thirdCard.
 void setTrickWinner(int trickWinner)
          Setter for property trickWinner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Trick

public Trick(int foreHand)
Creates a new instance of Trick

Method Detail

getForeHand

public int getForeHand()

getFirstCard

public Card getFirstCard()
Getter for property firstCard.

Returns:
Value of property firstCard.

setFirstCard

public void setFirstCard(Card firstCard)
Setter for property firstCard.

Parameters:
firstCard - New value of property firstCard.

getSecondCard

public Card getSecondCard()
Getter for property secondCard.

Returns:
Value of property secondCard.

setSecondCard

public void setSecondCard(Card secondCard)
Setter for property secondCard.

Parameters:
secondCard - New value of property secondCard.

getThirdCard

public Card getThirdCard()
Getter for property thirdCard.

Returns:
Value of property thirdCard.

getCard

public Card getCard(int player)
Gets a card from the trick

Parameters:
player - The player
Returns:
The card played by the player

setThirdCard

public void setThirdCard(Card thirdCard)
Setter for property thirdCard.

Parameters:
thirdCard - New value of property thirdCard.

getTrickWinner

public int getTrickWinner()
Getter for property trickWinner.

Returns:
Value of property trickWinner.

setTrickWinner

public void setTrickWinner(int trickWinner)
Setter for property trickWinner.

Parameters:
trickWinner - New value of property trickWinner.

getCardVector

public CardVector getCardVector()
Returns the cards of the trick as CardVector

Returns:
The cards of the trick