|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Remote interface for TicTacToe and Gomoku. This interface adapts the BoardGame interface. All RemoteGame methods throw RemoteException, and none of them throws an AssertionException. BoardGame methods that return a Player are adapted here so they return a char representing the Player (since a Player is not a remote object). This interface also allows a client to register as a RemoteObserver of the game.
GameProxy
Method Summary | |
void |
addObserver(RemoteObserver o)
Register as a RemoteObserver of the game. |
int |
cols()
|
char |
currentPlayer()
|
char |
join()
A client connected to the game must join the game to know what its mark is (X or O). |
boolean |
move(Move move)
Attempt to move to the given square. |
boolean |
notOver()
|
boolean |
ready()
The game is ready to be played. |
int |
rows()
|
java.lang.String |
winner()
|
Method Detail |
public boolean ready() throws java.rmi.RemoteException
public char join() throws java.rmi.RemoteException
public boolean move(Move move) throws java.rmi.RemoteException
public int cols() throws java.rmi.RemoteException
public int rows() throws java.rmi.RemoteException
public char currentPlayer() throws java.rmi.RemoteException
public java.lang.String winner() throws java.rmi.RemoteException
public boolean notOver() throws java.rmi.RemoteException
public void addObserver(RemoteObserver o) throws java.rmi.RemoteException
RemoteObserver
,
GameObserver
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |