Swift playground using Logo-like commands
Swift
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Turtle.playground
.gitignore
README.md

README.md

TurtlePlayground

Swift playground using Logo-like commands

A few preliminary notes:

The playground doesn't seem to be respecting page order. Click on TOC to go to the table of contents and the navigation will work from there.

  • This playground requires the new playground format and features released in Xcode 7 and Swift 2. This version requires Yosemite.
  • From time to time playgrounds can crash or seem to disappear from time to time. The current fix suggested by Apple is to show the package contents of the playground and delete the workspace.
  • Type "turtle" in the Linear Turtle playground page. You should see "Linear_Turtle_with_Target_PageSources.Turtle" on the right. Mouse over it and you will see the quick look icon and the show value icon. Click on the show value icon. You should see a rectangle with a turtle in the middle. Enlarge the box if you like.
  • Make the turtle move by typing in "forward() or back()". Stop when you've hit your target'.
  • In the next page add the functions right() and left().
  • In the next page the four functions can take arguments specifying how much to move forward() or back() and how much to turn right() or left().
  • In the next page you can change colors using penColor() or nextColor().
  • In the final page you can show() and hide() the icon or control the pen using penUp() or penDown().
  • Create routines and your own functions.

I am working on a book that will serve as a tutorial using this playground. It will be available soon.

This project is presented without any sort of warranty - use at your own risk.