12345678910111213141516171819202122232425262728293031323334353637 |
- package animation;
- import 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();
- }
|