|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.kosi.model.game.GameAdapter
An abstract adapter class for receiving game events. The methods in this class are empty. This class exists as convenience for creating listener objects. Extend this class to create a game event listener and override the methods for the events of interest.
ChangeLog:
$Log: GameAdapter.java,v $ Revision 1.9 2001/08/30 10:44:38 jiriki Finished implementation of claim Revision 1.8 2001/08/30 08:05:19 jiriki Worked on claiming Revision 1.7 2001/08/28 12:35:23 jiriki Started Implementation of claim Revision 1.6 2001/08/23 11:11:36 madmanmoon Client-side implementation of claims complete. Revision 1.5 2001/07/13 10:49:06 jiriki Started fix for Bugs 440155 and 440333. Revision 1.4 2001/06/06 09:22:35 betacarotine updated documentation Revision 1.3 2001/06/01 13:22:58 jiriki GameView working again. Revision 1.2 2001/05/30 10:25:51 jiriki Refactored Client. Revision 1.1.1.1 2001/04/29 18:05:18 jiriki Imported sources from zola. Revision 1.4 2001/04/17 19:30:08 wombat Updated Documentation Revision 1.3 2001/04/08 17:07:12 wombat Account Erstellung eingebaut Revision 1.2 2001/04/08 14:30:45 wombat Anfang Implementierung der selbst-alertierung Revision 1.1 2001/03/23 10:49:13 wombat new files
Constructor Summary | |
GameAdapter()
Creates a new GameAdapter. |
Method Summary | |
void |
handleActivePlayer(int direction,
int trickSuit,
int number)
Invoked when a player becomes active during card play. |
void |
handleActivePlayer(int direction,
SuitBid highestBid,
boolean doublePossible,
boolean redoublePossible)
Invoked when a player becomes active during bidding. |
void |
handleBid(Bid bid,
Alert alert,
int number)
Invoked when a bid has been placed. |
void |
handleCard(Card card,
int direction,
int number)
Invoked when a card is played. |
void |
handleClaim(int tricks,
java.util.Collection cards)
Invoked when a player claims the remaining tricks. |
void |
handleClaimResult(boolean accepted)
Invoked to inform the players of the result of a claim. |
void |
handleDummyDown(java.util.Collection cards,
int direction)
Invoked when the dummy cards are published to all players. |
void |
handleStateChanged(int status)
Invoked when the game's state changed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GameAdapter()
Method Detail |
public void handleActivePlayer(int direction, SuitBid highestBid, boolean doublePossible, boolean redoublePossible) throws java.rmi.RemoteException
handleActivePlayer
in interface GameListener
direction
- Direction of the player beeing activated.highestBid
- Highest bid placed until now.doublePossible
- Wether a double is possible.redoublePossible
- Wether a redouble is possible.java.rmi.RemoteException
- If the remote call fails.public void handleActivePlayer(int direction, int trickSuit, int number) throws java.rmi.RemoteException
handleActivePlayer
in interface GameListener
direction
- Direction of the player beeing activated.trickSuit
- The suit of the current trick, or -1 if not available.java.rmi.RemoteException
- If the remote call fails.public void handleBid(Bid bid, Alert alert, int number) throws java.rmi.RemoteException
handleBid
in interface GameListener
bid
- Bid that has been placed.alert
- Alert if this bid was alerted, null otherwise.number
- Number of the Bidjava.rmi.RemoteException
- if the remote call fails.public void handleCard(Card card, int direction, int number) throws java.rmi.RemoteException
handleCard
in interface GameListener
card
- Card that is played.direction
- The direction that the card came from.number
- Number of the card. (the n-th card beeing played, 0 .. 51)java.rmi.RemoteException
- if the remote call fails.public void handleDummyDown(java.util.Collection cards, int direction) throws java.rmi.RemoteException
handleDummyDown
in interface GameListener
cards
- Collection containing the cards of the dummy.direction
- Direction of the dummy.java.rmi.RemoteException
- if the remote call fails.public void handleClaim(int tricks, java.util.Collection cards) throws java.rmi.RemoteException
handleClaim
in interface GameListener
tricks
- the number of tricks being claimed.cards
- the cards of the player who claims.java.rmi.RemoteException
- if the remote call fails.public void handleClaimResult(boolean accepted) throws java.rmi.RemoteException
handleClaimResult
in interface GameListener
accepted
- wether the claim has been accepted.java.rmi.RemoteException
- if the remote call fails.public void handleStateChanged(int status) throws java.rmi.RemoteException
handleStateChanged
in interface GameListener
status
- New status (PLAYING, FINISHED)java.rmi.RemoteException
- If the remote call fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |