|
|||||||||||
| 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 engine| Method Detail |
public boolean playCard(Card card)
State
playCard in interface Statecard - the card being played
public boolean bidMade(BelotBid bid)
State
bidMade in interface Statebid - the bid being made
public boolean announceTrick(BelotTrick trick)
State
announceTrick in interface Statetrick - the trick
public java.util.Set getAllowedBids()
State
getAllowedBids in interface Statepublic java.util.Set getAllowedCards()
State
getAllowedCards in interface Statepublic 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 | ||||||||||