jskat.player
Class HumanPlayer

java.lang.Object
  extended by jskat.player.JSkatPlayerImpl
      extended by jskat.player.HumanPlayer
All Implemented Interfaces:
JSkatPlayer

public class HumanPlayer
extends JSkatPlayerImpl

The JSkat Player

Author:
Jan Schäfer

Field Summary
 
Fields inherited from class jskat.player.JSkatPlayerImpl
cards, currGameType, currTrump, forehandPlayer, handGame, log, ouvertGame, playerID, playerName, playerState, singlePlayer, skat
 
Constructor Summary
HumanPlayer(int playerID)
          Creates a new instance of SkatPlayer
HumanPlayer(int playerID, java.lang.String playerName)
          Creates a new instance of SkatPlayer
 
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
 boolean isAIPlayer()
           
 boolean isHumanPlayer()
           
 boolean lookIntoSkat(boolean isRamsch)
          Check if you want to look in the skat
 Card playCard(CardVector trick)
          This method should wait for human player
 void showTrick(CardVector trick, int trickWinner)
          Makes the current trick known to the players when it is complete
 void takeRamschSkat(CardVector skat, boolean jacksAllowed)
          Take the skat in a ramsch round
 
Methods inherited from class jskat.player.JSkatPlayerImpl
cardPlayed, getCard, getCardVector, getPlayerID, getPlayerName, newGame, playNextCard, removeCard, removeCard, removeCard, setPlayerID, setPlayerName, setState, setUpBidding, sortCards, startGame, takeCard, takeSkat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HumanPlayer

public HumanPlayer(int playerID)
Creates a new instance of SkatPlayer


HumanPlayer

public HumanPlayer(int playerID,
                   java.lang.String playerName)
Creates a new instance of SkatPlayer

Method Detail

bidMore

public boolean bidMore(int currBidValue)
Description copied from interface: JSkatPlayer
Asks the player whether it wants to bid higher or not


announceGame

public GameAnnouncement announceGame()
Description copied from interface: JSkatPlayer
Asks the player for the game he wants to play


playCard

public Card playCard(CardVector trick)
This method should wait for human player


takeRamschSkat

public void takeRamschSkat(CardVector skat,
                           boolean jacksAllowed)
Description copied from interface: JSkatPlayer
Take the skat in a ramsch round


lookIntoSkat

public boolean lookIntoSkat(boolean isRamsch)
Description copied from interface: JSkatPlayer
Check if you want to look in the skat


isHumanPlayer

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

isAIPlayer

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

showTrick

public void showTrick(CardVector trick,
                      int trickWinner)
Description copied from class: JSkatPlayerImpl
Makes the current trick known to the players when it is complete

Specified by:
showTrick in interface JSkatPlayer
Specified by:
showTrick in class JSkatPlayerImpl
Parameters:
trick - The CardVector of the current trick
trickWinner - The trick winner