package Algorithms.Animated;

import Algorithms.Animated.BK.BlockCalc;

/**
 * Represents a specific stage of the algorithm.
 * Example calculating the blocks, see {@link BlockCalc}.
 * 
 * @author kolja
 *
 */
public interface AlgorithmStage {
    /**
     * Indicates whether the whole stage is finished.
     * @author kolja
     *
     */
	public static enum StageStatus
	{
		UNFINISHED,
		FINISHED
	}
	
	/**
	 * perform one atomic step of the algorithm
	 * @return whether the whole stage is finished.
     * For example if all steps are reverted, then {@code FINISHED} is returned.
	 */
	public StageStatus forwardStep();
    
    /**
     * undo one atomic step of the algorithm
     * @return whether the whole stage is finished in backwards direction. 
     * For example if all steps are reverted, then {@code FINISHED} is returned.
     */
	public StageStatus backwardStep();
}
