From 8443f784d5a695e036bf2502fa3b126cd0e7e33f Mon Sep 17 00:00:00 2001 From: Daniel Steinberg Date: Thu, 4 Jun 2015 14:24:55 -0400 Subject: [PATCH] Release candidate - plenty more clean up to do --- .../Sources/Secret Turtle Stuff/CosmicTurtle.swift | 2 +- .../Sources/Secret Turtle Stuff/Turtle.swift | 2 ++ .../Sources/Your Turtle Routines/WhichTurtle.swift | 3 +-- Turtle.playground/contents.swift | 13 ++++--------- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Turtle.playground/Sources/Secret Turtle Stuff/CosmicTurtle.swift b/Turtle.playground/Sources/Secret Turtle Stuff/CosmicTurtle.swift index 8caf32e..ee8a170 100644 --- a/Turtle.playground/Sources/Secret Turtle Stuff/CosmicTurtle.swift +++ b/Turtle.playground/Sources/Secret Turtle Stuff/CosmicTurtle.swift @@ -1,6 +1,7 @@ import UIKit import CoreGraphics + public class CosmicTurtle : Turtle { @@ -9,7 +10,6 @@ public class CosmicTurtle : Turtle { override init() { super.init() backgroundColor = UIColor.blackColor() - paths.append(path) turtleIconView = UIImageView(image: UIImage(named: "RedTurtle.png")) colors = [PenColor.Green] } diff --git a/Turtle.playground/Sources/Secret Turtle Stuff/Turtle.swift b/Turtle.playground/Sources/Secret Turtle Stuff/Turtle.swift index 774189b..e089cab 100644 --- a/Turtle.playground/Sources/Secret Turtle Stuff/Turtle.swift +++ b/Turtle.playground/Sources/Secret Turtle Stuff/Turtle.swift @@ -1,6 +1,7 @@ import UIKit import CoreGraphics + public class Turtle: UIView { private var showTurtle = true private var isPenDown = true @@ -18,6 +19,7 @@ public class Turtle: UIView { UIColor(red: 0.2, green: 1.0, blue: 1.0, alpha: 0.1) path.moveToPoint(center) path.lineWidth = lineWidth + paths.append(path) } required public init(coder aDecoder: NSCoder) { super.init(coder:aDecoder) diff --git a/Turtle.playground/Sources/Your Turtle Routines/WhichTurtle.swift b/Turtle.playground/Sources/Your Turtle Routines/WhichTurtle.swift index 919437f..18acc81 100644 --- a/Turtle.playground/Sources/Your Turtle Routines/WhichTurtle.swift +++ b/Turtle.playground/Sources/Your Turtle Routines/WhichTurtle.swift @@ -1,2 +1 @@ -public let turtle = CosmicTurtle() -//Turtle() +public let turtle = Turtle() diff --git a/Turtle.playground/contents.swift b/Turtle.playground/contents.swift index 3f01c5f..87777d5 100644 --- a/Turtle.playground/contents.swift +++ b/Turtle.playground/contents.swift @@ -1,10 +1,5 @@ -for _ in 1 ... 7 { - forward() - right(45) - nextColor() - forward() - left(90) - nextColor() -} +forward() +right() +forward() -//turtle +turtle