de.kosi.model.game
Class Claiming
java.lang.Object
|
+--de.kosi.model.game.Claiming
- All Implemented Interfaces:
- GamePhase
- public class Claiming
- extends java.lang.Object
- implements GamePhase
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Claiming
public Claiming(int tricks,
Playing playing)
hasToAnswer
public boolean hasToAnswer(int direction)
answerClaim
public void answerClaim(boolean accept,
int direction)
getState
public int getState()
- The state of the current game. There are three possible states:
BIDDING, PLAYING, FINISHED.
- Specified by:
getState
in interface GamePhase
- Returns:
- The state of the current game.
getActivePlayer
public int getActivePlayer()
throws InvalidGameStateException
- Returns the active player.
- Specified by:
getActivePlayer
in interface GamePhase
- Returns:
- The active player.
- Throws:
InvalidGameStateException
- If the game is already
finished.
getCards
public java.util.List getCards(int direction)
- Returns the cards that are in the hand of the player at the given
direction.
- Specified by:
getCards
in interface GamePhase
- Parameters:
direction
- The direction of the player whose cards are to
be returned.- Returns:
- A list of cards.
isAccepted
public boolean isAccepted()
isFinished
public boolean isFinished()
getClaimedTricks
public int getClaimedTricks()