This is necessary in order to make doctests actually useful and viable.
Idea: Using #[cfg(test)] to replace the definition of Turtle with something that has a test/mock window. Make that mock window do all the same stuff as TurtleWindow but with no piston stuff. This will require abstracting out a lot of the calculations that TurtleWindow and animation do.
This is necessary in order to make doctests actually useful and viable.
Idea: Using
#[cfg(test)]
to replace the definition ofTurtle
with something that has a test/mock window. Make that mock window do all the same stuff asTurtleWindow
but with no piston stuff. This will require abstracting out a lot of the calculations thatTurtleWindow
and animation do.