     mutating func calcFitness() {
         UIGraphicsBeginImageContextWithOptions(CGSizeMake(workingSize, workingSize), true, 1.0)
         let context = UIGraphicsGetCurrentContext()
-        draw(context, rect: CGRectMake(0, 0, workingSize, workingSize))
+        render(dna, context, CGRectMake(0, 0, workingSize, workingSize))
         let image = CGBitmapContextCreateImage(context)
         UIGraphicsEndImageContext()
         let imageData = rawDataFromCGImage(image)



struct Individual {
    var dna: [Nucleotide]
    var fitness: Float = 0.0
    
    init() {

typealias Point = (x: CGFloat, y: CGFloat)
typealias Color = (r: CGFloat, g: CGFloat, b: CGFloat, a: CGFloat)
typealias Polygon = [Point]
typealias Population = [Individual]
typealias DNA = [Nucleotide]

struct Nucleotide {
    let color: Color
    let polygon: Polygon
}


// Mutation
extension Nucleotide {
