|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xistrat.net.F4Daemon
public class F4Daemon
F4 Daemon Daemon to run the game
This class is instantiated from F4Server and its helper class Game when a user logs in a game/match. This class handles all messages during a single match. Once the match aborts, or someone wins, it terminates its existance. The client logs out and reconnects to the F4Server.
Field Summary | |
---|---|
java.util.LinkedList<FigurData[]> |
_allFig
|
java.util.LinkedList<StonesBean> |
_allStones
|
java.util.LinkedList<java.lang.Integer> |
_allTurns
|
static int |
MAX_NUMBER_OF_PLAYERS
|
Method Summary | |
---|---|
void |
closeSockets()
Tells every PlayerServer output stream to inform its clients the game has ended and that they should reconnect to their original adx:port to regain proper socket. |
boolean[] |
getAlive()
in Chess the king counts, in Reversi you can be annihilated, in Go not |
int |
getCurrPlayers()
|
java.lang.String[] |
getGameList()
|
int |
getNumPlayers()
|
java.lang.String[] |
getPositionList()
|
void |
run()
run |
void |
sendNewGame()
notify various game servers there is a new game on line |
void |
startSocketAndLogin(java.net.Socket playerSocket,
java.lang.String alias)
Called by F4Server, when there is a real login. |
void |
terminate()
gracefully terminates |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_NUMBER_OF_PLAYERS
public java.util.LinkedList<FigurData[]> _allFig
public java.util.LinkedList<java.lang.Integer> _allTurns
public java.util.LinkedList<StonesBean> _allStones
Method Detail |
---|
public void startSocketAndLogin(java.net.Socket playerSocket, java.lang.String alias)
public void sendNewGame()
public void run()
run
in interface java.lang.Runnable
public void closeSockets()
public void terminate()
public java.lang.String[] getGameList()
public java.lang.String[] getPositionList()
public boolean[] getAlive()
public int getNumPlayers()
public int getCurrPlayers()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |