Add --export-svg CLI parameter support to turtle_main macro

Co-authored-by: enaut <290005+enaut@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-01 20:31:58 +00:00
co-authored by enaut
parent 2b64be29a8
commit d85a9c7d26
2 changed files with 130 additions and 0 deletions
+17
View File
@@ -367,6 +367,23 @@ impl TurtleApp {
.all(|turtle| turtle.tween_controller.is_complete())
}
/// Check if all animations are complete (alias for is_complete)
#[must_use]
pub fn all_animations_complete(&self) -> bool {
self.is_complete()
}
/// Set the animation speed for all turtles
///
/// # Arguments
/// * `speed` - The animation speed to set for all turtles
pub fn set_all_turtles_speed(&mut self, speed: AnimationSpeed) {
for turtle in &mut self.world.turtles {
turtle.set_speed(speed);
turtle.tween_controller.set_speed(speed);
}
}
/// Get reference to the world state
#[must_use]
pub fn world(&self) -> &TurtleWorld {