     func gridPressed(position: Int, sender: UIButton) {
         if currentBoard.configuration[position] == Player.Empty {
             processMove(position, player: tttEngine.human, board: currentBoard)
+        }
+    }
+    
+    /**
+     Serves to read current state of the board and get the appropriate next step/move.
+     */
+    func checkCurrentState() {
+        if currentState == .ComputerTurn {
+            let nextMove = tttEngine.getNextMove(currentBoard)
+            processMove(nextMove, player: tttEngine.computer, board: currentBoard)
         }
     }
     

    var currentState = CurrentState.Begin {
        didSet {
            tttBoardView?.infoLabel.text = currentState.rawValue
            processCurrentState()
        }
    }
    

        }
    }
    
    func xButtonPressed(sender: UIButton) {
        resetBoard()
        tttEngine.human = .Player1
