package org.example.fogbeam.blackboard;

import java.util.ArrayList;
import java.util.List;
import java.util.Observable;

import org.example.fogbeam.blackboard.agent.BlackboardAgent;

public class Conversation extends Observable
{	
	private boolean paused;
	
	private List<BlackboardFrame> frames = new ArrayList<BlackboardFrame>();
	
	public void addMessage( final BlackboardFrame message )
	{
		System.out.println( "Conversation - got new BlackboardFrame" );
		
		frames.add( message );
		this.setChanged();
		
		// notify all the agents that the conversation has been modified
		this.notifyObservers(message);
	}
	
	public List<BlackboardFrame> getFrames() 
	{
		return frames;
	}

	public void forceUpdate() 
	{
		this.setChanged();
		
		// notify all the agents that the conversation has been modified
		this.notifyObservers();
	}
	
	public boolean isPaused() 
	{
		return paused;
	}
	
	public void setPaused(boolean paused) 
	{
		this.paused = paused;
	}
}

@@ -225,16 +225,374 @@
 able%0A%7B%09%0A
+%09/* TODO: should we have a %22mode%22 flag that lets us toggle%0A%09 * something like a specific %22teaching%22 mode, as a shortcut?%0A%09 * The idea is to have a mode where we are just sending direct commands%0A%09 * to the bot, which will be recognized by an agent that does%0A%09 * something that doens't generate any response, so there's no%0A%09 * need for interactivity.  %0A%09 */%0A%09%0A
 %09private

add comment with reminder of needed future work