org.ninm.games.cardgames.belot
Class SpecificTrumpState

java.lang.Object
  |
  +--org.ninm.games.cardgames.belot.StateAdapter
        |
        +--org.ninm.games.cardgames.belot.PlayingState
              |
              +--org.ninm.games.cardgames.belot.SpecificTrumpState
All Implemented Interfaces:
State

public class SpecificTrumpState
extends PlayingState

This state represents the logic of a "Specific Trumps" game e.g. (Spades, Clubs, Hearts and Diamonds).

Version:
1.0
Author:
Nikolay

Field Summary
private  Suit m_trumpSuit
           
 
Fields inherited from class org.ninm.games.cardgames.belot.PlayingState
m_hand, m_isFirstHand, m_isFirstMove, m_trumpSuits
 
Fields inherited from class org.ninm.games.cardgames.belot.StateAdapter
m_belotEngine
 
Constructor Summary
SpecificTrumpState(BelotEngine belotEngine)
          Constructor for SpecificTrumpState.
 
Method Summary
 java.util.Set getAllowedCards()
          returns the allowed cards that the current player can play
 
Methods inherited from class org.ninm.games.cardgames.belot.PlayingState
announceTrick, beats, beats, beats, findAnnouncedBelots, getAllowedTricks, getCardsThatBeat, getCardsThatBeat, getScore, isTrump, isTrump, playCard, removeBelot, removeConflictingTricks, start
 
Methods inherited from class org.ninm.games.cardgames.belot.StateAdapter
bidMade, getAllowedBids
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_trumpSuit

private final Suit m_trumpSuit
Constructor Detail

SpecificTrumpState

public SpecificTrumpState(BelotEngine belotEngine)
Constructor for SpecificTrumpState.

Parameters:
belotEngine -
Throws:
java.lang.RuntimeException - if in debug mode and trump suit is null
Method Detail

getAllowedCards

public java.util.Set getAllowedCards()
Description copied from interface: State
returns the allowed cards that the current player can play

Specified by:
getAllowedCards in interface State
Specified by:
getAllowedCards in class PlayingState
Returns:
List the array of allowed cards for the player

SourceForge.net Logo