Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class Turtle {
fun penDown()
fun penUp()
fun turn(degrees: Double)
fun forward(pixels: Double)
}
with(Turtle()) {
penDown()
for(i in 1..4) {
forward(100.0)
turn(90.0)
}
penUp()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment