rem: Mod3.getBestMoveForCard = function(card) { var i;  var rowStart = card.row * 8, rowEnd = rowStart + 8; for(i = rowStart; i < rowEnd; i++) { var pile = this.foundations[i]; if(this.canMoveTo(card,pile)) return pile; }  var parent = card.parentNode; var piles = parent.isNormalPile ? this.getPilesRound(parent) : this.stacks; for(i = 0; i < piles.length; i++) if(!piles[i].hasChildNodes()) return piles[i]; return null; }; 
add: getBestMoveForCard: function(card) { var piles = card.parentNode.isNormalPile ? getPilesRound(card.parentNode) : this.stacks;   return searchPiles(this.foundations, testCanMoveToFoundation(card)) || searchPiles(piles, testPileIsEmpty); }, 
context: Mod3.getBestMoveForCard = function(card) {  var i;  // to a foundation  var rowStart = card.row * 8, rowEnd = rowStart + 8;  for(i = rowStart; i < rowEnd; i++) {    var pile = this.foundations[i];    if(this.canMoveTo(card,pile)) return pile;  }  // or to a space in the 4th row  var parent = card.parentNode;  var piles = parent.isNormalPile ? this.getPilesRound(parent) : this.stacks;  for(i = 0; i < piles.length; i++)    if(!piles[i].hasChildNodes())      return piles[i];  return null;};
meta: 3385	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3385/16cf1285aa3c691e959e2aabb4cbf0501cad4a97/mod3.js/buggy/mod3.js