Exemplo n.º 1
0
 public override void Receive(ThoughtResponse thoughtResponse)
 {
     foreach (Thought thought in thoughtResponse.Thoughts)
     {
         thoughts.Add(FocusThought(thought));
     }
     FocusThoughts();
 }
Exemplo n.º 2
0
    public override void Receive(ThoughtRequest thoughtRequest)
    {
        Topic.Stage requestStage = thoughtRequest.MyStage;
        string      topic        = thoughtRequest.Topic;

        if (!thoughts.ContainsKey(topic))
        {
            return;
        }
        if (!thoughts[topic].ContainsKey(requestStage))
        {
            return;
        }
        if (thoughts[topic][requestStage].Count <= 0)
        {
            return;
        }

        ThoughtResponse thoughtResponse = new ThoughtResponse(new HashSet <Thought>(thoughts[topic][requestStage]));

        thoughts[topic][requestStage].Clear();
        Send(thoughtResponse);
    }
Exemplo n.º 3
0
 public void Send(ThoughtResponse thoughtResponse)
 {
     myInput.Route(thoughtResponse);
 }
Exemplo n.º 4
0
 public void Route(ThoughtResponse thoughtResponse) => attention.Receive(thoughtResponse);
Exemplo n.º 5
0
 public abstract void Receive(ThoughtResponse thought);