Interface IMasterEngine

All Known Implementing Classes:
MasterEngine

public interface IMasterEngine


Method Summary
 int addBody(Body body)
          Add body to game, assigning it an unique id#.
 void addClient(REngine engine)
           
 void replaceBody(int id, Body body)
          Add body to game, replacing one with the given id#.
 boolean setAcceleration(int id, boolean isStartNotStop)
           
 boolean setFire(int id, boolean isStartNotStop)
           
 boolean setTurn(int id, int direction)
          Change rotation of a ship.
 void setWorld(World world)
           
 

Method Detail

setWorld

public void setWorld(World world)

addBody

public int addBody(Body body)
Add body to game, assigning it an unique id#. Return the id.

replaceBody

public void replaceBody(int id,
                        Body body)
Add body to game, replacing one with the given id#.

addClient

public void addClient(REngine engine)

setTurn

public boolean setTurn(int id,
                       int direction)
Change rotation of a ship.
Parameters:
id - id# of body
direction - 1 turns left, 0 stops rotation, -1 turns right.
Returns:
Whether operation was successful.

setAcceleration

public boolean setAcceleration(int id,
                               boolean isStartNotStop)

setFire

public boolean setFire(int id,
                       boolean isStartNotStop)