package animation;

import javax.swing.JTree;

import bk.BlockCalc;

/**
 * Represents a specific stage of the algorithm.
 * Example calculating the blocks, see {@link BlockCalc}.
 * Each of those stages also has an associated {@link PseudoCodeNode}, i.e., a line of pseudocode.
 * 
 * @author kolja
 *
 */
public interface AlgorithmStage {
    /**
     * Indicates whether the whole stage is finished.
     * @author kolja
     *
     */

    /**
     * Creates a {@link PseudoCodeNode}, i.e., a line of pseudocode that resembles this Stage.
     * @param tree The {@link JTree} where the node should be inserted.
     * @return The node.
     */
    public PseudoCodeNode createPseudocodeTree( JTree tree );
    
    /**
     * Writes the state of the variables used in this stage to a pretty table.
     * This table should also render nicely if interpreted as markdown. 
     * @return the table
     */
    public String getDebugString();
}
