rem: this.thingsToReveal = this.stacks.concat(this.reserves); 
add: this.thingsToReveal = this.piles.concat(this.reserves); 
context:   initPiles: function() {    // Unless these are set explicitly then all games share the same arrays (breaking everything)    this.stacks = [];    this.foundations = [];    this.reserves = [];    this.cells = [];    var allpiles = this.allstacks = [];    var id = this.id;    var thiss = this; // so it can be referred to in nested functions    function initPileOfType(type, property, field) {      var pile = initPileFromId(id+type);      if(!pile) return;      pile[property] = true;      thiss[field] = pile;      allpiles.push(pile);    }    function initPilesOfType(type, property, array) {      for(var i = 0; true; i++) {        var node = initPileFromId(id+type+i);        if(!node) break;        node[property] = true;        array.push(node);        allpiles.push(node);      }    }    initPileOfType("-stock", "isStock", "stock");    initPileOfType("-waste", "isWaste", "waste");    initPileOfType("-foundation", "isFoundation", "foundation");    initPileOfType("-reserve", "isReserve", "reserve");    initPilesOfType("-pile-", "isNormalPile", this.stacks);    initPilesOfType("-foundation-", "isFoundation", this.foundations);    initPilesOfType("-reserve-", "isReserve", this.reserves);    initPilesOfType("-cell-", "isCell", this.cells);    if(this.stock) {      // a <label/> for displaying the num. of deals left      var counter = this.stock.counter = document.getElementById(id+"-stock-counter");      if(counter) counter.add = function(val) { this.value = parseInt(this.value)+val; };    }    // autoplay sources    this.sourcePiles = this.waste ? [this.waste].concat(this.stacks) : this.stacks;    // drag'n'drop targets.  could also include cells, but FreeCell/Towers don't use d'n'd in any case    this.dragDropTargets = this.stacks.concat(this.foundations);    if(this.foundation) this.dragDropTargets.push(this.foundation);    // which piles should we automatically reveal the top card of?    // (some games have no use for this, but checking all these piles doesn't take very long so...)    this.thingsToReveal = this.stacks.concat(this.reserves);    if(this.reserve) this.thingsToReveal.push(this.reserve);  },
meta: 3385	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3385/15f3df693ddf02fb9ee6a2662189220868368b23/cardgame.js/buggy/cardgame.js