   }
   
   func handleSwipe(swipe: UISwipeGestureRecognizer) {
-    let direction:DirectionsType = swipe.direction.translateToDirection()
+    let direction: DirectionsType = swipe.direction.translateToDirection()
     let result = DirectionsManager.sharedInstance.validateDirection(direction)
     self.scoreManager?.calculateScore(result)
     self.updateScoreView()

      directions.setup()
      self.directionsView.addSubview(directions)
      directions.translatesAutoresizingMaskIntoConstraints = false
      directions.leadingAnchor.constraintEqualToAnchor(self.directionsView.leadingAnchor).active = true
      directions.trailingAnchor.constraintEqualToAnchor(self.directionsView.trailingAnchor).active = true
      directions.topAnchor.constraintEqualToAnchor(self.directionsView.topAnchor).active = true
      directions.bottomAnchor.constraintEqualToAnchor(self.directionsView.bottomAnchor).active = true
    }
  }
  
  func setRandomPosition() {
    let randomSquareSize = Int.random(200...250)
    
    let maxX = Int(self.view.frame.size.width) - randomSquareSize
    let maxY = Int(self.view.frame.size.height - 44) - randomSquareSize
    
    let randomX = Int.random(1...maxX)
    let randomY = Int.random(1...maxY)

import UIKit

class GameBoardViewController: UIViewController {
  let topBarHeight = 44 //size of top navigation bar, navbar here it's just normal UIView
  let minDirectionViewSquare = 200 //minimum size of view with directions
  let maxDirectionViewSquare = 250 //maximum size of view with directions
  
  @IBOutlet weak var directionsViewHeight: NSLayoutConstraint!
  @IBOutlet weak var directionsViewWidth: NSLayoutConstraint!
  @IBOutlet weak var directionsViewAxisX: NSLayoutConstraint!
