public void broadCastMessage(AASMAMessage msg)
 {
     _broadCastPool.Add(msg);
 }
 public void sendMessage(AASMAMessage msg, String receiver)
 {
     msg.Receiver = receiver;
     _msgPool.Add(msg);
 }
Example #3
0
 public override void receiveMessage(AASMAMessage msg)
 {
 }
 public abstract void receiveMessage(AASMAMessage msg);
Example #5
0
        public override void receiveMessage(AASMAMessage msg)
        {
            // MESSAGES ARE TREATED AS BELIEFS UPDATES
            // message about hoshimi found
            if (msg.Content.Contains("hoshimi"))
            {
                bool empty = true;
                Point location = (Point)msg.Tag;
                foreach (NanoBot bot in getAASMAFramework().NanoBots)
                {
                    if(bot.GetType().Equals(typeof(NanoNeedle)) && bot.Location.Equals(location))
                    {
                        empty = false;
                    }
                }
                if(empty && !HoshimisAvailable.Contains(location)){
                    this.HoshimisAvailable.Add((Point)msg.Tag);
                    getAASMAFramework().logData(this._nanoAI, "New hoshimi point at: " + location.X + "," + location.Y);
                }
            }

            //message about hoshimi unavailable = remove hoshimi
        }