|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.kosi.model.game.AfterGame
The base class for results of a game of bridge. This is similarly used as the phase of a game of bridge when it has been finished.
ChangeLog:
$Log: AfterGame.java,v $ Revision 1.3 2001/06/01 15:11:14 betacarotine readded these two nice files Revision 1.3 2001/05/30 10:19:18 pizarro Updated Documentation. Revision 1.2 2001/05/25 14:51:23 betacarotine Added a result handling mechanism for the game.
Constructor Summary | |
AfterGame(Board board)
Creates a new AfterGame instance with PassedThroughResult. |
|
AfterGame(Board board,
java.util.List bids,
Contract contract,
java.util.List cards,
StopWatch stopWatch)
Creates a new after game instance with TimeExceedResult for the case that the time was exceeded in the playing phase. |
|
AfterGame(Board board,
java.util.List bids,
StopWatch stopWatch)
Creates a new AfterGame instance with TimeExceedResult for the case that the time was exceeded in the bidding phase. |
|
AfterGame(Board board,
java.util.List bids,
SuitContract contract,
java.util.List cards,
int declarerTricks)
Creates a new AfterGame instance with NormalResult for the case that the game has been finished normally. |
Method Summary | |
int |
getActivePlayer()
Returns the active player. |
java.util.List |
getCards(int direction)
The method returns the cards curenty in the hands of the player seated at the given direction. |
Result |
getResult()
Returns the result of the game. |
int |
getState()
Returns the game state that is represented by this instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AfterGame(Board board)
board
- The board that was played on.public AfterGame(Board board, java.util.List bids, Contract contract, java.util.List cards, StopWatch stopWatch)
board
- The board that was played on.bids
- The bids that were made in the bidding phase.contract
- The contract of the game.cards
- The cards that have been played yet.stopWatch
- The stop watch to determine the time exceeding
pair.public AfterGame(Board board, java.util.List bids, StopWatch stopWatch)
board
- The board that was played on.bids
- The bids that were made in the bidding phase.stopWatch
- The stopWatch to determine the pair that
exceeded the time.public AfterGame(Board board, java.util.List bids, SuitContract contract, java.util.List cards, int declarerTricks)
board
- The board that was played on.bids
- The bids that were made in the bidding phase.contract
- The contract of the game.cards
- The cards that were played in the playing phase in
the order they appeared on the table.declarerTricks
- Number of tricks that the declarer made.Method Detail |
public int getState()
getState
in interface GamePhase
public int getActivePlayer() throws InvalidGameStateException
getActivePlayer
in interface GamePhase
InvalidGameStateException
- Is thrown because there is
no active player.public java.util.List getCards(int direction)
getCards
in interface GamePhase
direction
- The direction the player whose cards are to be
returned is seated at.public Result getResult()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |