jp.ac.nagoyau.is.ss.kishii.suntori.message.information
Class VictimInformation

java.lang.Object
  extended by jp.ac.nagoyau.is.ss.kishii.suntori.message.RCRSCSMessage
      extended by jp.ac.nagoyau.is.ss.kishii.suntori.message.information.WorldInformation
          extended by jp.ac.nagoyau.is.ss.kishii.suntori.message.information.VictimInformation
All Implemented Interfaces:
IMessage

public class VictimInformation
extends WorldInformation

The class show the information of victim.

Author:
takefumi

Field Summary
 
Fields inherited from class jp.ac.nagoyau.is.ss.kishii.suntori.message.RCRSCSMessage
COMMON_DATA_TYPE, data, messageType
 
Constructor Summary
VictimInformation(BaseMessageType type, java.util.List<java.lang.Integer> bitList, int offset, java.util.EnumMap<DataType,java.lang.Integer> bitSizeMap)
          The method that the library use to convert the message.
VictimInformation(int time, rescuecore2.worldmodel.EntityID vicID, rescuecore2.worldmodel.EntityID area, int hp, int buriedness, int damage)
          Constructor
VictimInformation(int time, rescuecore2.worldmodel.EntityID vicID, rescuecore2.worldmodel.EntityID area, int hp, int buriedness, int damage, rescuecore2.misc.Pair<java.lang.Integer,java.lang.Integer> cor)
          Constructor
 
Method Summary
 rescuecore2.worldmodel.EntityID getAreaID()
          Return EntityID of area that the victim exist
 int getBuriedness()
          Return buriedness of the victim
 rescuecore2.misc.Pair<java.lang.Integer,java.lang.Integer> getCoodinate()
          Return coordinate of the victim(Pair<Integer,Integer>)
If not be setted, returned (-1,-1).
 int getDamage()
          Return damage of the victim
 rescuecore2.worldmodel.EntityID getEntityID()
           
 int getHP()
          Return hp of the victim
 rescuecore2.worldmodel.EntityID getVictimID()
          Return EntityID of the victim.
 
Methods inherited from class jp.ac.nagoyau.is.ss.kishii.suntori.message.RCRSCSMessage
equals, getBrokenness, getBuriedness, getCoodinate, getDamage, getData, getData, getDataTypeArray, getEntityIDList, getFieryness, getHP, getID, getMessageBitSize, getMessageType, getRepairCost, getSendTime, getSendTime, getWater, getWaterPower, hashCode, isSendable, setCoorinate, setData, setData
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VictimInformation

public VictimInformation(int time,
                         rescuecore2.worldmodel.EntityID vicID,
                         rescuecore2.worldmodel.EntityID area,
                         int hp,
                         int buriedness,
                         int damage)

Constructor

Create the victim information. Included data are follow. Additionally, This message can send the location data of the victim( Pair<Integer,Integer> ), if location information doesn't exist, we get this as (-1,-1).
And not only EntityID of the civilian, but also EntityID of the platoon is assignable as vicID.

Parameters:
time - step num
vicID - EntityID of the victim
area - EntityID of area that the victim exist
hp - hp of the victim
buriedness - buriedness of the victim
damage - damage of the victim

VictimInformation

public VictimInformation(int time,
                         rescuecore2.worldmodel.EntityID vicID,
                         rescuecore2.worldmodel.EntityID area,
                         int hp,
                         int buriedness,
                         int damage,
                         rescuecore2.misc.Pair<java.lang.Integer,java.lang.Integer> cor)

Constructor

Create the victim information. Included data are follow. Additionally, This message can send the location data of the victim( Pair<Integer,Integer> ), if location information doesn't exist, we get this as (-1,-1).
And not only EntityID of the civilian, but also EntityID of the platoon is assignable as vicID.

Parameters:
time - step num
vicID - EntityID of the victim
area - EntityID of area that the victim exist
hp - hp of the victim
buriedness - buriedness of the victim
damage - damage of the victim
cor - coordinate of the victim

VictimInformation

public VictimInformation(BaseMessageType type,
                         java.util.List<java.lang.Integer> bitList,
                         int offset,
                         java.util.EnumMap<DataType,java.lang.Integer> bitSizeMap)
The method that the library use to convert the message.

Parameters:
type -
bitList -
offset -
bitSizeMap -
Method Detail

getVictimID

public rescuecore2.worldmodel.EntityID getVictimID()
Return EntityID of the victim.

Returns:
EntityID

getHP

public int getHP()
Return hp of the victim

Returns:
hp of the victim

getBuriedness

public int getBuriedness()
Return buriedness of the victim

Returns:
buriedness

getDamage

public int getDamage()
Return damage of the victim

Returns:
damage of the victim

getAreaID

public rescuecore2.worldmodel.EntityID getAreaID()
Return EntityID of area that the victim exist

Returns:
EntityID of area

getCoodinate

public rescuecore2.misc.Pair<java.lang.Integer,java.lang.Integer> getCoodinate()
Return coordinate of the victim(Pair<Integer,Integer>)
If not be setted, returned (-1,-1).

Returns:
coordinate of thSe victim

getEntityID

public rescuecore2.worldmodel.EntityID getEntityID()
Specified by:
getEntityID in class WorldInformation