|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ninm.games.cardgames.belot.StateAdapter
A utility class which can be used to adapt the State interfaces
Field Summary | |
protected BelotEngine |
m_belotEngine
|
Constructor Summary | |
StateAdapter(BelotEngine engine)
Constructor for StateAdapter. |
Method Summary | |
boolean |
announceTrick(BelotTrick trick)
tells the engine that a particular player wishes to anounce a trick |
boolean |
bidMade(BelotBid bid)
indicates a bid has been made by a particluar player |
java.util.Set |
getAllowedBids()
returs the allowed bids the current player can make |
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 |
boolean |
playCard(Card card)
indicates a card has been played by a particular player |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.ninm.games.cardgames.belot.State |
start |
Field Detail |
protected final BelotEngine m_belotEngine
Constructor Detail |
public StateAdapter(BelotEngine engine)
engine
- a reference to the belot engineMethod Detail |
public boolean playCard(Card card)
State
playCard
in interface State
card
- the card being played
public boolean bidMade(BelotBid bid)
State
bidMade
in interface State
bid
- the bid being made
public boolean announceTrick(BelotTrick trick)
State
announceTrick
in interface State
trick
- the trick
public java.util.Set getAllowedBids()
State
getAllowedBids
in interface State
public java.util.Set getAllowedCards()
State
getAllowedCards
in interface State
public java.util.Set getAllowedTricks()
State
getAllowedTricks
in interface State
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |