Created
March 30, 2018 18:40
-
-
Save iamcrypticcoder/c93f06f0beb9443d3400fd1e84d0de46 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public class Circle : Shape { | |
var x: Int = 0 | |
var y: Int = 0 | |
var radius: Int = 0 | |
convenience init(_ x: Int, _ y: Int, _ radius: Int, _ graphicsApi: GraphicsAPI) { | |
self.init(graphicsApi) | |
self.x = x | |
self.y = y | |
self.radius = radius | |
} | |
override func draw() -> Void { | |
self.graphicsApi.drawCircle(self.x, self.y, self.radius) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment