jskat.player.AIPlayerMJL
Class TrickInfo

java.lang.Object
  extended by jskat.player.AIPlayerMJL.TrickInfo

public class TrickInfo
extends java.lang.Object

Author:
Markus J. Luzius

Constructor Summary
TrickInfo()
          Constructor
 
Method Summary
 Card getCard(int index)
          Get a certain card of the trick
 int getDemandSuit()
          Convenience method for getting the suit color of the initial card
 int getForehandPlayer()
          get the forehand player for the current trick
 GameInfo getGameInfo()
          get the current gameInfo
 int getGameType()
          Convenience method for getting the current game type
 int getSinglePlayerPos()
          get the position of the single player within the trick
 CardVector getTrick()
          get the current trick
 int getTrickValue()
          Calculates the value of all the cards in the trick
 int getTrump()
          Concenience method for getting the current trump color
 void setForehandPlayer(int id)
          set the forehand player for the current trick
 void setGameInfo(GameInfo info)
          set the current gameInfo
 void setSinglePlayerPos(int pos)
          set the position of the single player within the trick
 void setTrick(CardVector trick)
          set the current trick
 int size()
          Convenience method for getting the size of the trick
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrickInfo

public TrickInfo()
Constructor

Method Detail

getGameInfo

public GameInfo getGameInfo()
get the current gameInfo

Returns:
gameInfo

getTrick

public CardVector getTrick()
get the current trick

Returns:
current trick

setGameInfo

public void setGameInfo(GameInfo info)
set the current gameInfo

Parameters:
info - current game info to be set

setTrick

public void setTrick(CardVector trick)
set the current trick

Parameters:
trick - current trick to be set

getForehandPlayer

public int getForehandPlayer()
get the forehand player for the current trick

Returns:
ID of the forehand player

setForehandPlayer

public void setForehandPlayer(int id)
set the forehand player for the current trick

Parameters:
id - forehand player in the current trick

getSinglePlayerPos

public int getSinglePlayerPos()
get the position of the single player within the trick

Returns:
position in the current trick (0-2)

setSinglePlayerPos

public void setSinglePlayerPos(int pos)
set the position of the single player within the trick

Parameters:
pos - position of the single player

getCard

public Card getCard(int index)
Get a certain card of the trick

Parameters:
index -
Returns:
card, null if index not available

size

public int size()
Convenience method for getting the size of the trick

Returns:
size

getDemandSuit

public int getDemandSuit()
Convenience method for getting the suit color of the initial card

Returns:
suit value

getTrickValue

public int getTrickValue()
Calculates the value of all the cards in the trick

Returns:
sum of the values

getGameType

public int getGameType()
Convenience method for getting the current game type

Returns:
game type

getTrump

public int getTrump()
Concenience method for getting the current trump color

Returns:
trump color