I tried with applying some physics. so if its within given angle values, it pin them together, if not, I just add a little force to the box, so it "bounces" off.
With some changes, you could unpin all objects and add force to them, so the whole tower would crumble.
http://dl.dropbox.com/u/52716812/PinToExample_2.capx