[x] Include the following in the lib.rs file via an external md file.
The API Documentation below will help you learn about the various things you can do with this library.
If this is your first time using Rust or using this library, visit the Guide on turtle.rs.
The Turtle struct documentation contains information about the various things you can do with the Turtle instances you create. The Color struct contains hundreds of constants that you can use as color values. As a convenience, you can use the color name listed with each constant in a string instead of the constant itself. See that module for more information about how to use different colors.
Event Handling
For advanced users, the Event struct documentation provides information about how you can create an event loop and draw things in response to certain events like the mouse moving, or even keystrokes.
The Turtle struct contains a few convenience methods so you can do some common event-related things without creating the entire event loop.
Use wait_for_click() to wait for the user to click anywhere on the screen before continuing
[x] Look for TODO comments pertaining to documentation and resolve them by adding appropriate documentation
[x] Add examples to as much documentation as possible
[x] Document what implements Rand and how to use randomness (create a rand module with docs on top, re-export the random function from lib.rs, re-export the rand crate from our internal rand module)
[x] Document random Distances, Angles, Points, etc.
[x] Add some basic usage documentation to the top of the Turtle struct docs
[x] Document the different ways to initialize a color in the Color struct docs (From a string, randomly)
[x] Document opaque() and transparent() methods on Color with examples
If this is your first time using Rust or using this library, visit the Guide on turtle.rs.
The
Turtle
struct documentation contains information about the various things you can do with theTurtle
instances you create. TheColor
struct contains hundreds of constants that you can use as color values. As a convenience, you can use the color name listed with each constant in a string instead of the constant itself. See that module for more information about how to use different colors.Event Handling
For advanced users, the
Event
struct documentation provides information about how you can create an event loop and draw things in response to certain events like the mouse moving, or even keystrokes.The
Turtle
struct contains a few convenience methods so you can do some common event-related things without creating the entire event loop.wait_for_click()
to wait for the user to click anywhere on the screen before continuingRand
and how to use randomness (create arand
module with docs on top, re-export therandom
function fromlib.rs
, re-export therand
crate from our internalrand
module)Turtle
struct docsColor
struct docs (From a string, randomly)opaque()
andtransparent()
methods onColor
with examples