com.planeth.gtroids.agents
Class ShipAgent

java.lang.Object
  extended bycom.planeth.gtroids.agents.ShipAgent
All Implemented Interfaces:
IThreadControllable

public class ShipAgent
extends java.lang.Object
implements IThreadControllable

Virtual Pilot for a Ship
It must be controlled by a Thread

Author:
Andreas Grässer, gal@planet-h.com.
created Jun 20, 2005
See Also:
TimedObjectThread, Ship

Constructor Summary
ShipAgent(Ship ship)
          Constructor for ShipAgent.
 
Method Summary
 void doNextStep()
          Does the next step
 boolean isReadyToDie()
          Returns true, if the IThreadControllable is ready to die
Ready to die means, the Thread which controls the IThreadControllable, will terminate and the IThreadControllable will be deleted.
 void setReadyToDie()
          Sets the IThreadControllable ready to die.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShipAgent

public ShipAgent(Ship ship)
Constructor for ShipAgent.

Parameters:
ship - the Ship to be controlled
Method Detail

doNextStep

public void doNextStep()
Description copied from interface: IThreadControllable
Does the next step

Specified by:
doNextStep in interface IThreadControllable
See Also:
IThreadControllable.doNextStep()

setReadyToDie

public void setReadyToDie()
Description copied from interface: IThreadControllable
Sets the IThreadControllable ready to die.

Specified by:
setReadyToDie in interface IThreadControllable
See Also:
IThreadControllable.setReadyToDie()

isReadyToDie

public boolean isReadyToDie()
Description copied from interface: IThreadControllable
Returns true, if the IThreadControllable is ready to die
Ready to die means, the Thread which controls the IThreadControllable, will terminate and the IThreadControllable will be deleted.

Specified by:
isReadyToDie in interface IThreadControllable
Returns:
Returns true, if the IThreadControllable is ready to die
See Also:
IThreadControllable.isReadyToDie()