예제 #1
0
 public void TellInformationToOthers(IAInformation.InformationType type, float length, string parameters, bool order = false)
 {
     infoToTell = new IAInformation(brain.unitID, type, length, parameters, order);
     informationToCommunicate.Add(infoToTell);
     if (order)
     {
         if (infoToTell.NeedConfirmation())
         {
             brain.SetOrderConfirmation(infoToTell);
         }
     }
     else
     {
         brain.memory.RegisterMemory(infoToTell, true);
     }
 }
예제 #2
0
 public bool ExistInformation(IAInformation.InformationType type, string parameters = "")
 {
     return(informationToCommunicate.Exists(c => c.type == type && (string.IsNullOrEmpty(parameters) || c.parameters == parameters)));
 }
예제 #3
0
 public void RemoveInformation(IAInformation.InformationType type, string parameters = "")
 {
     informationToCommunicate.RemoveAll(c => c.type == type && (string.IsNullOrEmpty(parameters) || c.parameters == parameters));
 }
예제 #4
0
 public void CleanOrders(IAInformation.InformationType type, string parameters = "")
 {
     hardMemory.RemoveAll(c => c.toDo && c.type == type && (string.IsNullOrEmpty(parameters) || c.parameters == parameters));
 }
예제 #5
0
 public List <IAInformation> GetOrdersOfType(IAInformation.InformationType type)
 {
     return(hardMemory.FindAll(c => c.toDo && c.type == type));
 }