cz.cuni.pogamut.Client
Class KnownItems

java.lang.Object
  extended by cz.cuni.pogamut.Client.KnownItems
All Implemented Interfaces:
RcvMsgListener, java.util.EventListener

public class KnownItems
extends java.lang.Object
implements RcvMsgListener

store all known inventory spots - as ITEM-derived messages

should be fast in getting item of desired object

structure is HashMap>


Field Summary
private  java.util.HashMap<MessageType,java.util.ArrayList<Item>> items
           
 
Constructor Summary
KnownItems(AgentBody body)
           
 
Method Summary
 java.util.ArrayList<Ammo> getKnownAmmos()
           
 java.util.ArrayList<Armor> getKnownArmors()
           
 java.util.ArrayList<Extra> getKnownExtras()
           
 java.util.ArrayList<Health> getKnownHealths()
           
 java.util.ArrayList<Item> getKnownItemsByType(MessageType type)
           
 java.util.ArrayList<Special> getKnownSpecials()
           
 java.util.ArrayList<Weapon> getKnownWeapons()
           
 void receiveMessage(RcvMsgEvent e)
          messages got processed only with navPoint setted otherwise those are sended during the game so they could be fallen from somebody or thrown by somebody and so agent should not remember them
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

items

private java.util.HashMap<MessageType,java.util.ArrayList<Item>> items
Constructor Detail

KnownItems

public KnownItems(AgentBody body)
Method Detail

receiveMessage

public void receiveMessage(RcvMsgEvent e)
messages got processed only with navPoint setted otherwise those are sended during the game so they could be fallen from somebody or thrown by somebody and so agent should not remember them

Specified by:
receiveMessage in interface RcvMsgListener

getKnownWeapons

public java.util.ArrayList<Weapon> getKnownWeapons()

getKnownHealths

public java.util.ArrayList<Health> getKnownHealths()

getKnownArmors

public java.util.ArrayList<Armor> getKnownArmors()

getKnownAmmos

public java.util.ArrayList<Ammo> getKnownAmmos()

getKnownSpecials

public java.util.ArrayList<Special> getKnownSpecials()

getKnownExtras

public java.util.ArrayList<Extra> getKnownExtras()

getKnownItemsByType

public java.util.ArrayList<Item> getKnownItemsByType(MessageType type)