Is it possible to draw a line between two circles in the below code?
\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\begin{document}
\tikzset{
crcl/.style={draw, thick, shape=circle }
}
\newcommand*{\MyPic}[2]{
\begin{tikzpicture}
\draw #1 rectangle #2;
\node[crcl] at #1 (c) {};
\end{tikzpicture}
}
\begin{tikzpicture}
\node[fill=blue] at (0,0) (a) {\MyPic{(0,0)}{(1,1)}};
\node[fill=green] [xshift=2cm] at (0,0) (b) {\MyPic{(0,0)}{(1,1)}};
\draw[thick] (a) -- (b);
\end{tikzpicture}
\end{document}