org.ninm.games.cardgames.belot
Class NoTrumpsState

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

public class NoTrumpsState
extends PlayingState

This state represents the logic of the "No Trumps" game

Version:
1.0
Author:
Nikolay

Field Summary
 
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
NoTrumpsState(BelotEngine belotEngine)
          Constructor for NoTrumpsState.
 
Method Summary
 java.util.Set getAllowedCards()
          returns the allowed cards that the current player can play
 java.util.Set getAllowedTricks()
          returns the allowed tricks that the current player can announce
 
Methods inherited from class org.ninm.games.cardgames.belot.PlayingState
announceTrick, beats, beats, beats, findAnnouncedBelots, 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
 

Constructor Detail

NoTrumpsState

public NoTrumpsState(BelotEngine belotEngine)
Constructor for NoTrumpsState.

Parameters:
belotEngine -
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

getAllowedTricks

public java.util.Set getAllowedTricks()
Description copied from interface: State
returns the allowed tricks that the current player can announce

Specified by:
getAllowedTricks in interface State
Overrides:
getAllowedTricks in class PlayingState
Returns:
List the array of allowed tricks for the current player

SourceForge.net Logo