jskat.player
Interface JSkatPlayer

All Known Implementing Classes:
AIPlayerMJL, AIPlayerRND, HumanPlayer, JSkatPlayerImpl

public interface JSkatPlayer

The JSkat Player Interface

Author:
Jan Schäfer

Method Summary
 GameAnnouncement announceGame()
          Asks the player for the game he wants to play
 boolean bidMore(int currBidValue)
          Asks the player whether it wants to bid higher or not
 void cardPlayed(Card card)
          Informs the player about a card that was played
 int getPlayerID()
          Returns the ID of the SkatPlayer
 java.lang.String getPlayerName()
          Returns the name of the SkatPlayer
 boolean isAIPlayer()
           
 boolean isHumanPlayer()
           
 boolean lookIntoSkat(boolean isRamsch)
          Check if you want to look in the skat
 void newGame()
          Informs the player about the start of a new game
 Card playCard(CardVector trick)
          Get next Card to play
 int playNextCard(CardVector trick)
          Deprecated.  
 Card removeCard(Card card)
          Deprecated.  
 Card removeCard(int index)
          Deprecated.  
 Card removeCard(int suit, int value)
          Get the selected card from the player's hand
 void setPlayerID(int newPlayerID)
          Returns the ID of the SkatPlayer
 void setPlayerName(java.lang.String newPlayerName)
          Sets the name of the SkatPlayer
 void setUpBidding(int initialForehandPlayer)
          Notifies the player of the start of bidding for a new game
 void showTrick(CardVector trick, int trickWinner)
          Makes the current trick known to the players when it is complete
 void startGame(int singlePlayer, int forehandPlayer, int gameType, int trump, boolean handGame, boolean ouvertGame)
          Start the game: inform player of game type, trumpf and special options
 void takeCard(Card newCard)
          Take a card from someone
 void takeRamschSkat(CardVector skat, boolean jacksAllowed)
          Take the skat in a ramsch round
 void takeSkat(CardVector skat)
          Take the skat as a single player.
 

Method Detail

newGame

void newGame()
Informs the player about the start of a new game


setUpBidding

void setUpBidding(int initialForehandPlayer)
Notifies the player of the start of bidding for a new game


bidMore

boolean bidMore(int currBidValue)
Asks the player whether it wants to bid higher or not


takeCard

void takeCard(Card newCard)
Take a card from someone


lookIntoSkat

boolean lookIntoSkat(boolean isRamsch)
Check if you want to look in the skat


takeSkat

void takeSkat(CardVector skat)
Take the skat as a single player.
When the method is done, the skat CardVector must still contain exactly two cards. Otherwise a SkatHandlingException might be thrown.


takeRamschSkat

void takeRamschSkat(CardVector skat,
                    boolean jacksAllowed)
Take the skat in a ramsch round


announceGame

GameAnnouncement announceGame()
Asks the player for the game he wants to play


startGame

void startGame(int singlePlayer,
               int forehandPlayer,
               int gameType,
               int trump,
               boolean handGame,
               boolean ouvertGame)
Start the game: inform player of game type, trumpf and special options


playNextCard

int playNextCard(CardVector trick)
Deprecated. 

Get next Card to play


playCard

Card playCard(CardVector trick)
Get next Card to play


cardPlayed

void cardPlayed(Card card)
Informs the player about a card that was played

Parameters:
card - The Card the was played

showTrick

void showTrick(CardVector trick,
               int trickWinner)
Makes the current trick known to the players when it is complete


removeCard

Card removeCard(int suit,
                int value)
Get the selected card from the player's hand


removeCard

Card removeCard(Card card)
Deprecated. 

Get the selected card from the player's hand


removeCard

Card removeCard(int index)
Deprecated. 

Get the selected card from the player's hand


getPlayerName

java.lang.String getPlayerName()
Returns the name of the SkatPlayer


setPlayerName

void setPlayerName(java.lang.String newPlayerName)
Sets the name of the SkatPlayer


getPlayerID

int getPlayerID()
Returns the ID of the SkatPlayer


setPlayerID

void setPlayerID(int newPlayerID)
Returns the ID of the SkatPlayer


isHumanPlayer

boolean isHumanPlayer()
Returns:
true, if the player is a human player

isAIPlayer

boolean isAIPlayer()
Returns:
true, if the player is an AI player