gecco.client
Class ServerAdapter

java.lang.Object
  |
  +--gecco.client.ServerAdapter
All Implemented Interfaces:
Server

public class ServerAdapter
extends Object
implements Server

This is an adapter for the Server interface, all methods are implemented to do nothing.

Author:
Andreas Enblom.

Constructor Summary
ServerAdapter()
           
 
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 ServerAdapter object
 Image getMap()
          Gets the Map attribute of the ServerAdapter object
 Dimension getMapSize()
          Gets the MapSize attribute of the ServerAdapter object
 Point getMapUpperLeft()
          Gets the MapUpperLeft attribute of the ServerAdapter object
 boolean joinAsRole(String role)
          Description of the Method
 void startGame()
          Description of the Method
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

ServerAdapter

public ServerAdapter()
Method Detail

getAvailableRoles

public StringTokenizer getAvailableRoles()
Gets the AvailableRoles attribute of the ServerAdapter object
Specified by:
getAvailableRoles in interface Server
Returns:
The AvailableRoles value

getMap

public Image getMap()
Gets the Map attribute of the ServerAdapter object
Specified by:
getMap in interface Server
Returns:
The Map value

getMapUpperLeft

public Point getMapUpperLeft()
Gets the MapUpperLeft attribute of the ServerAdapter object
Specified by:
getMapUpperLeft in interface Server
Returns:
The MapUpperLeft value

getMapSize

public Dimension getMapSize()
Gets the MapSize attribute of the ServerAdapter object
Specified by:
getMapSize in interface Server
Returns:
The MapSize value

connect

public boolean connect(String host,
                       int port)
Description of the Method
Specified by:
connect in interface Server
Parameters:
host - Description of Parameter
port - Description of Parameter
Returns:
Description of the Returned Value

disconnect

public void disconnect()
Description of the Method
Specified by:
disconnect in interface Server

joinAsRole

public boolean joinAsRole(String role)
Description of the Method
Specified by:
joinAsRole in interface Server
Parameters:
role - Description of Parameter
Returns:
Description of the Returned Value

startGame

public void startGame()
Description of the Method
Specified by:
startGame in interface Server

doAction

public long doAction(int pieceHandle,
                     Action a)
Description of the Method
Specified by:
doAction in interface Server
Parameters:
pieceHandle - Description of Parameter
a - Description of Parameter
Returns:
Description of the Returned Value

abortAction

public void abortAction(long actionId)
Description of the Method
Specified by:
abortAction in interface Server
Parameters:
actionId - Description of Parameter