public override void Receive(ThoughtResponse thoughtResponse) { foreach (Thought thought in thoughtResponse.Thoughts) { thoughts.Add(FocusThought(thought)); } FocusThoughts(); }
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); }
public void Send(ThoughtResponse thoughtResponse) { myInput.Route(thoughtResponse); }
public void Route(ThoughtResponse thoughtResponse) => attention.Receive(thoughtResponse);
public abstract void Receive(ThoughtResponse thought);