rem: var cells = this.countFreeCells(); 
add: var cells = this.countEmptyCells(); 
context: FreeCell.movePossible = function(card,target) {  // XXX destinaton should be usable in moves, but the moving algorithms are slightly broken  // count spaces, excluding the destination  var spaces = 0;  for(var i = 0; i < 8; i++)    if(!this.stacks[i].hasChildNodes() && this.stacks[i]!=target) spaces++;  var cells = this.countFreeCells();  // this is the number we can move using the most complex algorithm  var numCanMove = (cells+1) * (1 + (spaces * (spaces + 1) / 2));  // count number of cards to move  var numToMove = 0;  for(var next = card; next; next = next.nextSibling) numToMove++;  //  return numToMove<=numCanMove;}
meta: 3385	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3385/66d74ea71196b9e74b97e01a3cc0a139a5f4f580/freecell.js/buggy/freecell.js