-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GSoC: Add Turtle Class #17
Conversation
A 3-D turtle with yaw, pitch and roll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some usage examples would be good, can be a separate PR.
src/turtle.jl
Outdated
penDown = true | ||
return new(pos, direction, normal, penBlock, stepSize, penDown) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create a keyword constructor, so that people can use it as turtle(;stepSize = 0.5)
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, this looks good now, but please document the constructor.
src/turtle.jl
Outdated
|
||
Move the turtle `t` forward `s` steps. | ||
""" | ||
function move(t::turtle, s::Int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe have the function take Real
, and convert to Int
before applying?
Examples will be a part of a different PR. |
A 3-D turtle with yaw, pitch and roll. Addresses #13