|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gecco.client.TestServer
This a test implementation of a server. It is very ugly and should only be used for testing purposes.
Inner Class Summary | |
class |
TestServer.TestThread
Description of the Class |
Field Summary | |
(package private) long |
actionId
Description of the Field |
(package private) Client |
client
Description of the Field |
(package private) Image |
map
Description of the Field |
(package private) int |
numOfPieces
Description of the Field |
(package private) Position[] |
positions
Description of the Field |
(package private) TestServer.TestThread |
serverThread
Description of the Field |
(package private) boolean[] |
shouldRest
Description of the Field |
(package private) Dimension |
size
Description of the Field |
(package private) Hashtable |
stateMap
Description of the Field |
Constructor Summary | |
TestServer(Client c)
Constructor for the TestServer object |
Method Summary | |
void |
abortAction(long actionId)
Description of the Method |
boolean |
connect(String host,
int port)
Description of the Method |
void |
disconnect()
Description of the Method |
long |
doAction(int pieceHandle,
Action a)
Description of the Method |
StringTokenizer |
getAvailableRoles()
Gets the AvailableRoles attribute of the TestServer object |
Image |
getMap()
Gets the Map attribute of the TestServer object |
Dimension |
getMapSize()
Gets the MapSize attribute of the TestServer object |
Point |
getMapUpperLeft()
Gets the MapUpperLeft attribute of the TestServer object |
boolean |
joinAsRole(String role)
Description of the Method |
void |
startGame()
Description of the Method |
Methods inherited from class java.lang.Object |
|
Field Detail |
long actionId
Client client
final int numOfPieces
Position[] positions
boolean[] shouldRest
Hashtable stateMap
TestServer.TestThread serverThread
Dimension size
Image map
Constructor Detail |
public TestServer(Client c)
c
- Description of ParameterMethod Detail |
public StringTokenizer getAvailableRoles()
getAvailableRoles
in interface Server
public Point getMapUpperLeft()
getMapUpperLeft
in interface Server
public Dimension getMapSize()
getMapSize
in interface Server
public Image getMap()
getMap
in interface Server
public boolean connect(String host, int port)
connect
in interface Server
host
- Description of Parameterport
- Description of Parameterpublic void disconnect()
disconnect
in interface Server
public boolean joinAsRole(String role)
joinAsRole
in interface Server
role
- Description of Parameterpublic void startGame()
startGame
in interface Server
public long doAction(int pieceHandle, Action a)
doAction
in interface Server
pieceHandle
- Description of Parametera
- Description of Parameterpublic void abortAction(long actionId)
abortAction
in interface Server
actionId
- Description of Parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |