         
     }
     
-    // MARK: -
+    // MARK: - Game Functionality
+    
+    func configureSession() {
+        if utsname().hasAtLeastA9() { // checks if user's device supports the more precise ARWorldTrackingSessionConfiguration
+            
+        // Create a session configuration
+        let configuration = ARWorldTrackingSessionConfiguration()
+        configuration.planeDetection = ARWorldTrackingSessionConfiguration.PlaneDetection.horizontal
+        
+        // Run the view's session
+        sceneView.session.run(configuration)
+        } else {
+            // slightly less immersive AR experience due to lower end processor
+            let configuration = ARSessionConfiguration()
+            
+            // Run the view's session
+            sceneView.session.run(configuration)
+        }
+    }
     
     func addNewShip() {
         let cubeNode = Ship()

    func getUserDirection() -> SCNVector3 {
        if let frame = self.sceneView.session.currentFrame {
        let mat = SCNMatrix4FromMat4(frame.camera.transform)
            print("matrix", mat)
            return SCNVector3(-1 * mat.m31, -1 * mat.m32, -1 * mat.m33)
        }
        return SCNVector3(0, 0, -1)

        
        // ARKit owns the node corresponding to the anchor, so make the plane a child node.
        node.addChildNode(planeNode)
    } */
    
    // MARK: - Actions
    
