|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface should be implemented by a card game and should enforce the logic of the game
Method Summary | |
void |
addBonusListener(BonusListener bonusListener)
registers the bonus listener with this engine |
void |
addDealerListener(DealerListener dealerListener)
registers the dealer listener with this engine |
boolean |
announceTrick(Player player,
Trick trick)
tells the engine that a particular player wishes to anounce a trick |
boolean |
bidMade(Player player,
Bid bid)
indicates a bid has been made by a particluar player |
Player |
getActivePlayer()
returns the player whos turn it is |
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(Player player,
Card card)
informs the engine of a played card |
Method Detail |
public Player getActivePlayer()
public java.util.Set getAllowedCards()
public java.util.Set getAllowedTricks()
public java.util.Set getAllowedBids()
public boolean playCard(Player player, Card card)
player
- the player that plays the cardcard
- the card to be played
public void addBonusListener(BonusListener bonusListener)
bonusListener
- the bonus listenerpublic void addDealerListener(DealerListener dealerListener)
dealerListener
- the dealer listenerpublic boolean announceTrick(Player player, Trick trick)
player
- the player making the anouncementtrick
- the trick
public boolean bidMade(Player player, Bid bid)
player
- the player making the bidbid
- the bid being made
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |