org.ninm.games.cardgames.belot
Interface State

All Known Implementing Classes:
StateAdapter

public interface State

This is the interface which all Belot states should implement

Version:
1.0
Author:
Nikolay

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
 void start()
          starts the logic of this state!
 

Method Detail

playCard

public boolean playCard(Card card)
indicates a card has been played by a particular player

Parameters:
card - the card being played
Returns:
true if the card was played succesfully

bidMade

public boolean bidMade(BelotBid bid)
indicates a bid has been made by a particluar player

Parameters:
bid - the bid being made
Returns:
true if the bid was made successfully

announceTrick

public boolean announceTrick(BelotTrick trick)
tells the engine that a particular player wishes to anounce a trick

Parameters:
trick - the trick
Returns:
true if the trick was announced successfully

getAllowedCards

public java.util.Set getAllowedCards()
returns the allowed cards that the current player can play

Returns:
List the array of allowed cards for the player

getAllowedTricks

public java.util.Set getAllowedTricks()
returns the allowed tricks that the current player can announce

Returns:
List the array of allowed tricks for the current player

getAllowedBids

public java.util.Set getAllowedBids()
returs the allowed bids the current player can make

Returns:
List a list of bids

start

public void start()
starts the logic of this state!


SourceForge.net Logo