Very low priority until all the drawing methods are completed. Postponed in order to keep the library's implementation as simple as possible while we are still figuring everything out. This will involve refactoring quite a bit of the behind the scenes code in the codebase. We'll have to plan out what those changes should be to meet all the requirements of this feature.
The idea is that we would have an API that looks something like this:
let mut window = TurtleWindow::new();
let turtle1 = window.add_turtle();
let turtle2 = window.add_turtle();
turtle1.forward(100.0);
turtle2.right(90.0);
turtle2.forward(100.0);
The animations would still occur sequentially in this example (one turtle would move at a time). Ideally we would like the turtles to be able to run in multiple threads so that multiple turtles can be drawing on the screen at once.
This feature is excellent for teaching parallel and concurrent programming.
Note that this feature has nothing to do with async. There is a separate issue (#17) open for that.
Very low priority until all the drawing methods are completed. Postponed in order to keep the library's implementation as simple as possible while we are still figuring everything out. This will involve refactoring quite a bit of the behind the scenes code in the codebase. We'll have to plan out what those changes should be to meet all the requirements of this feature.
The idea is that we would have an API that looks something like this:
The animations would still occur sequentially in this example (one turtle would move at a time). Ideally we would like the turtles to be able to run in multiple threads so that multiple turtles can be drawing on the screen at once.
This feature is excellent for teaching parallel and concurrent programming.
reset()andclear()methods toDrawingthat clear all of the drawings. The turtlereset()andclear()methods only clear that turtle's drawingsTurtleneeds to beSendin order for each turtle to be moved into a separate thread, havingTurtlebeSyncis probably not desirableexamples/maze_multipleexample that uses multiple turtles to draw the maze concurrentlywait_for_clickdoes not work for multiple turtles because it consumes events from the global event pipeNote that this feature has nothing to do with async. There is a separate issue (#17) open for that.