rem: Mod3.getHints = function() { for(var i = 0; i < this.allstacks.length; i++) { var source = this.allstacks[i]; if(source.isStock || !source.hasChildNodes()) continue; var card = source.lastChild;  var rowStart = card.row * 8; for(var j = 0; j < 8; j++) { var target = this.foundations[rowStart+j]; if(!this.canMoveTo(card,target)) continue;    if(source.isFoundation && (target.hasChildNodes() ? card.previousSibling : source.parentNode==target.parentNode)) continue; this.addHint(card, target); 
add: getHints: function() { for(var i = 0; i < this.allstacks.length; i++) { var source = this.allstacks[i]; if(source.isStock || !source.hasChildNodes()) continue; var card = source.lastChild;  var row = this.rows[card.row]; for(var j = 0; j < 8; j++) { var target = row[j]; if(!this.canMoveTo(card,target)) continue;    if(source.isFoundation && (target.hasChildNodes() ? card.previousSibling : source.parentNode==target.parentNode)) continue; this.addHint(card, target); } 
context: Mod3.getHints = function() {  for(var i = 0; i < this.allstacks.length; i++) {    var source = this.allstacks[i];    if(source.isStock || !source.hasChildNodes()) continue;    var card = source.lastChild;        var rowStart = card.row * 8;    for(var j = 0; j < 8; j++) {      var target = this.foundations[rowStart+j];      if(!this.canMoveTo(card,target)) continue;      // hints are useful if:      // - |target| is empty and in a different row (so we don't suggest moving a 2/3/4 along a row)      // - |target| is nonempty, and |card| is the only card in |source|      if(source.isFoundation && (target.hasChildNodes()          ? card.previousSibling : source.parentNode==target.parentNode)) continue;      this.addHint(card, target);    }  }};
meta: 3385	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3385/16cf1285aa3c691e959e2aabb4cbf0501cad4a97/mod3.js/buggy/mod3.js