A turtle graphics engine for iOS written in Swift.
This is now developing with Swift 3 and Xcode 8 beta 6.
🐢.ClearScreen()
.Make("color", 0)
.Repeat(12) { 🐢
.SetPenWidth(2)
.Right(15)
.Repeat(6) { 🐢
.SetPenColor({ $0.PenColor + 1 })
.Forward(50)
.Right(60)
}
.SetPenWidth(1)
.Right(15)
.Repeat(6) { 🐢
.Make("color", { $0["color"] + 1 })
.SetPenColor({ $0["color"] })
.Forward(20)
.Right(60)
}
}
.Done()// Instantiate 🐢 with canvas size.
let 🐢 = Tortoise(canvasWidth: 300, canvasHeight: 300)
// Command 🐢 to draw.
🐢.Right(90).Forward(100).Done()
// Run and render.
🐢.run()
// Get rendered image.
let image = 🐢.renderedImageCleanScreenCleanForwardBackRightLeftHomeSetHeadingSetPositionSetXSetYDotArc
PenDownPenUpSetPenColorSetPenWidthSetLineCapSetLineDashSetBackgroundSetRGB
RandomTowardsShownHeadingPositionPenColorPenWidthBackgroundRGBCanvasSize
RepeatShowTortoiseHideTortoiseMake(Variable support)Print
- Swift 3 (Xcode 8 beta 6)
- iOS 10.0 beta
T.B.D.
SetCanvasSizecommandIf,While,Forstatement support- Procedure support
Canvasview- SPM/Carthage/Cocoapods installation
- macOS support

