Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gecco.server.core
Interface Server

All Known Implementing Classes:
  ServerImpl

public interface Server

Description of the Interface

Author:
  Unknown

Method Summary
`void` | `abortAction(String fromRole, long actionId)` Aborts the given action.
`void` | `actionOnPosition(String fromRole, long actionId, int unitHandle, String action, double x, double y)` Orders an action that takes a position parameter.
`void` | `actionOnUnit(String fromRole, long actionId, int unitHandle, String action, int targetUnit)` Orders an action that takes a unit and cooperative units as parameters.
`void` | `actionOnVoid(String fromRole, long actionId, int unitHandle, String action)` Orders an action that takes no parameters.
`byte[]` | `getMap()` Returns the map itself, in its original state.
`Dimension` | `getMapSize()` Returns the size of the map.
`Map` | `getUnitTypeIcons()` Returns a map with keys representing the string for each unit type.
`void` | `resendAllData(String fromRole)` Called when a client wants all its available visible information sent

Method Detail

### actionOnVoid

    public void actionOnVoid(String fromRole,
                             long actionId,
                             int unitHandle,
                             String action)

  Orders an action that takes no parameters.

  Parameters:
    `fromRole` - the role that sent the order.
    `actionId` - an identifier for this action.
    `unitHandle` - the unit being ordered.
    `action` - the action to perform.

### actionOnUnit

    public void actionOnUnit(String fromRole,
                             long actionId,
                             int unitHandle,
                             String action,
                             int targetUnit)

  Orders an action that takes a unit and cooperative units as parameters.

  Parameters:
    `fromRole` - the role that sent the order.
    `actionId` - an identifier for this action.
    `unitHandle` - the unit being ordered.
    `action` - the action to perform.
    `targetUnit` - the unit being targeted.

### actionOnPosition

    public void actionOnPosition(String fromRole,
                                 long actionId,
                                 int unitHandle,
                                 String action,
                                 double x,
                                 double y)

  Orders an action that takes a position parameter.

  Parameters:
    `fromRole` - the role that sent the order.
    `actionId` - an identifier for this action.
    `unitHandle` - the unit being ordered.
    `action` - the action to perform.
    `x` - the X coordinate parameter.
    `y` - the Y coordinate parameter.

### abortAction

    public void abortAction(String fromRole,
                            long actionId)

  Aborts the given action. This causes the action to fail.

  Parameters:
    `fromRole` - the role that sent the order.
    `actionId` - the action to cancel.

### resendAllData

    public void resendAllData(String fromRole)

  Called when a client wants all its available visible information sent

  Parameters:
    `fromRole` - Description of Parameter

### getMapSize

    public Dimension getMapSize()

  Returns the size of the map.

  Returns:
    A Dimension object representing the size of the map.

### getMap

    public byte[] getMap()

  Returns the map itself, in its original state.

  Returns:
    A BufferedImage depicting the map.

### getUnitTypeIcons

    public Map getUnitTypeIcons()

  Returns a map with keys representing the string for each unit type. Each key maps to a byte-array containing the image data read from a .gif-image.

  Returns:
    The Map

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD