private static void inputLoop(GUIConsoleInterface console, String prompt) {
    	Reader input; 
        input = ((JConsole)console).getIn();
    	BufferedReader bufInput = new BufferedReader(input);

    	String newline = System.getProperty("line.separator");

    	console.print(prompt, Color.BLUE);

    	String line;
        try {
    		while ((line = bufInput.readLine()) != null) {
    		    console.print("You typed: " + line + newline, Color.ORANGE);

    		    // try to sync up the console
    		    //System.out.flush();
    		    //System.err.flush();
    		    //Thread.yield();  // this helps a little

    		    if (line.equals("quit")) break; 
    			console.print(prompt, Color.BLUE);
    		}
    		bufInput.close();
    	} catch (IOException e) {
    		e.printStackTrace();
    	}

    }