cz.cuni.amis.pogamut.defcon.communication.messages.infos
Class Sub

Package class diagram package Sub
java.lang.Object
  extended by cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConObject
      extended by cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConViewableObject
          extended by cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConUnitObject<SubState>
              extended by cz.cuni.amis.pogamut.defcon.communication.messages.infos.Sub
All Implemented Interfaces:
IWorldObject, ILocated, IViewable, ICompositeWorldObject

public class Sub
extends DefConUnitObject<SubState>

Submarine object from the world.


Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConViewableObject
location, teamId, visible
 
Constructor Summary
Sub(int id, int teamId, DefConLocation location, boolean visible, SubState state, int stateCount, int target, int nukeSupply, double time)
          Creates new instance of object Sub with specific id.
Sub(Sub original)
          Cloning constructor...
 
Method Summary
 int getNukeSupply()
          Number of nukes inside the submarine.
 String toHtmlString()
          Returns message in html format.
 String toString()
          Returns human readable serialization of the message.
 
Methods inherited from class cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConUnitObject
getState, getStateCount, getStringizedFields, getTarget, setState, setStateCount, setTarget
 
Methods inherited from class cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConViewableObject
getLocal, getLocation, getShared, getStatic, getTeamId, isVisible, setVisibility
 
Methods inherited from class cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConObject
createDestroyedEvent, createUpdateEvent, getDestroyed, getId, getLastSeenTime, getSimTime, getType, setLastSeenTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject
getId, getSimTime
 

Constructor Detail

Sub

public Sub(int id,
           int teamId,
           DefConLocation location,
           boolean visible,
           SubState state,
           int stateCount,
           int target,
           int nukeSupply,
           double time)
Creates new instance of object Sub with specific id. Submarine object from the world.

Parameters:
id - Game id of this object.
teamId - Id of this object's team.
location - Location of this object.
visible - Visibility of this object.
state - DefCon state of this unit.
stateCount - Number of activations of current state on this unit.
target - Current target of this unit.
nukeSupply - Number of nukes inside the submarine.
time - Time of last update of this object (time of first spotting in this case).

Sub

public Sub(Sub original)
Cloning constructor...

Parameters:
original -
Method Detail

getNukeSupply

public int getNukeSupply()
Number of nukes inside the submarine.

Returns:
int

toString

public String toString()
Returns human readable serialization of the message.

Overrides:
toString in class Object
Returns:
human readable string

toHtmlString

public String toHtmlString()
Returns message in html format.

Returns:
html message


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.