Skip to content

Instantly share code, notes, and snippets.

@iamcrypticcoder
Created March 30, 2018 18:40
Show Gist options
  • Save iamcrypticcoder/c93f06f0beb9443d3400fd1e84d0de46 to your computer and use it in GitHub Desktop.
Save iamcrypticcoder/c93f06f0beb9443d3400fd1e84d0de46 to your computer and use it in GitHub Desktop.
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