|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The listener interface for receiving Game events. A class implementing this interface is registered using the game's addGameListener method. Note that in the current implementation only ProxyGameListeners can be registered, because the server is not allowed to download the stub code of other classes. If a RemoteException occurs while calling a method in a GameListener, the client is disconnected. This will cause alle following calls by the client to fail and give it the possibility to reconnect. This way no inconsistent states will appear. It is not guaranteed, that events are processed in order. The client is responsible for bringing the events into order (using the direction information).
ChangeLog:
$Log: GameListener.java,v $ Revision 1.7 2001/08/30 10:44:38 jiriki Finished implementation of claim Revision 1.6 2001/08/28 12:35:23 jiriki Started Implementation of claim Revision 1.5 2001/08/23 11:11:36 madmanmoon Client-side implementation of claims complete. Revision 1.4 2001/07/13 10:49:06 jiriki Started fix for Bugs 440155 and 440333. 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.7 2001/04/17 19:30:08 wombat Updated Documentation Revision 1.6 2001/04/08 14:30:45 wombat Anfang Implementierung der selbst-alertierung Revision 1.5 2001/03/15 19:58:27 login now dummy down events are sent!! Revision 1.4 2001/03/05 20:55:22 login - Game (und zugehoerige Klassen) soweit fertig - package de.kosi.model.tournament angelegt - Pair angelegt - Round angelegt - Movement-Interface angelegt - KosiMovement fertig!!! :-) - KosiMovementTest um das KosiMovement zu testen (kann mit KOSI/kosimovementtestaufgerufen werden) - Tournament und TournamentImpl in das package de.kosi.model.tournament verschoben - buildfile fuer die neuen klassen angepasst Revision 1.3 2001/02/26 15:21:38 wombat worked on GamImpl and Board Revision 1.2 2001/02/19 23:21:16 wombat Added SSL Support, Implement DistributedListFilter Revision 1.1 2001/02/11 23:38:01 wombat - Started implementation of Game/GameListener - Started implementation of Latex Doclet - Documentation for Game
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 state)
Invoked when the game's state changed. |
Method Detail |
public void handleActivePlayer(int direction, SuitBid highestBid, boolean doublePossible, boolean redoublePossible) throws java.rmi.RemoteException
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.public void handleActivePlayer(int direction, int trickSuit, int number) throws java.rmi.RemoteException
direction
- Direction of the player beeing activated.trickSuit
- The suit of the current trick, or -1 if not available.number
- The number of the card, that will be played.public void handleBid(Bid bid, Alert alert, int number) throws java.rmi.RemoteException
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
card
- Card that is played.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
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
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
accepted
- wether the claim has been accepted.java.rmi.RemoteException
- if the remote call fails.public void handleStateChanged(int state) throws java.rmi.RemoteException
state
- New state (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 |