int howManyConnections(int col){
    connections = 0;

    if(col == Chip.WHITE){
      unTouchAllChipsOfColor(col);
      for (int i=0; i<8; i++) {//Check the first goal on the left.
        for(int j=1; j<7; j++){
        if(board[i][j].returnColor() == col){
          connectionExplore(col, board[i][j].getX(), board[i][j].getY());
          }
        }
      }
    }
    if(col == Chip.BLACK){
      unTouchAllChipsOfColor(col);
      for (int j=0; j<8; j++) {//Check the goal on the top.
        for(int i=1; i<7; i++){
        if(board[i][j].returnColor() == col){
          connectionExplore(col, board[i][j].getX(), board[i][j].getY());
          }
        }
      }
    }
    return connections;
  }