code: function(){
          while(this.numPairs>0){
              var pair=this.pairs[--this.numPairs];
              pair.shape1=null;
              pair.shape2=null;
          }
          this.numPairChecks=0;
          this.collectPairs();
      }
docs: Detect overlapping pairs.