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
Class ServerImpl

    java.lang.Object
      gecco.server.core.ServerImpl

All Implemented Interfaces:
  Server

public class ServerImpl
extends Object
implements Server

Description of the Class

Author:
  Unknown

Constructor Summary
`ServerImpl()` Constructor for the ServerImpl object

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 as a parameter.
`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()` Gets the UnitTypeIcons attribute of the ServerImpl object
`void` | `resendAllData(String role)` Description of the Method

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ServerImpl

    public ServerImpl()

  Constructor for the ServerImpl object

Method Detail

### getMapSize

    public Dimension getMapSize()

  Returns the size of the map.

  Specified by:
    `getMapSize` in interface `Server`
  Returns:
    A Dimension object representing the size of the map.

### getMap

    public byte[] getMap()

  Returns the map itself, in its original state.

  Specified by:
    `getMap` in interface `Server`
  Returns:
    An array of ints, representing the colours of the original map.

### getUnitTypeIcons

    public Map getUnitTypeIcons()

  Gets the UnitTypeIcons attribute of the ServerImpl object

  Specified by:
    `getUnitTypeIcons` in interface `Server`
  Returns:
    The UnitTypeIcons value

### actionOnVoid

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

  Orders an action that takes no parameters.

  Specified by:
    `actionOnVoid` in interface `Server`
  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 as a parameter.

  Specified by:
    `actionOnUnit` in interface `Server`
  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.

  Specified by:
    `actionOnPosition` in interface `Server`
  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.

  Specified by:
    `abortAction` in interface `Server`
  Parameters:
    `fromRole` - the role that sent the order.
    `actionId` - the action to cancel.

### resendAllData

    public void resendAllData(String role)

  Description of the Method

  Specified by:
    `resendAllData` in interface `Server`
  Parameters:
    `role` - Description of Parameter

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