         }
         return nearestBoid
     }
-
+    
+    /**
+     Rotates the sprite node so it's oriented in the direction of travel.
+     - parameters:
+     - orientation: A flock of boids to search
+     */
     func rotate() {
-        self.zRotation = CGFloat(-atan2(Double(velocity.x), Double(velocity.y))) - CGFloat(90).degreesToRadians
+        self.zRotation = CGFloat(-atan2(Double(velocity.x), Double(velocity.y))) - self.orientation.rawValue.degreesToRadians
     }
 }

    var sceneFrame = CGRect.zero
    var behaviors = [Behavior]()
    var neighborhood: [Boid] = [Boid]()
    
    let momentum: CGFloat = 5
    let visionAngle: CGFloat = 180
    

//
//  Created by Christopher Kriens on 4/5/17.

enum BoidOrientation: CGFloat {
    case north = 0
    case east = 270
    case south = 180
    case west = 90
}

import SpriteKit

class Boid: SKSpriteNode {
