/// <summary> /// Analyzes an image and creates a basic set of movement instructions. /// </summary> public IEnumerable<MovementInstruction> CreateMovementInstructions(Image image) { movementStack.Clear(); backtrackQueue.Clear(); instructions.Clear(); canvas = CreateCanvas(image); while (true) { canvas.VisitCurrentNode(); if (!TryNext()) { return instructions; } } }