add: this.wastes = bytype.w; 
context:   createPiles: function() {    const views = this.layout.views, numV = views.length;    const letters = this._pilesToBuildLetters, num = letters.length;    const classes = this._pilesToBuildClasses;    const bytype = this.pilesByType = {};    const all = this.allpiles = [];    if(num != numV) throw "game is trying to create " + num + " piles for " + numV + " views!";    for(var i = 0; i != num; ++i) {      var letter = letters[i], impl = classes[i], view = views[i];      var pile = createPile(impl);      all.push(pile);      var view = views[i];      pile.view = view;      view.displayPile(pile);      if(bytype[letter]) bytype[letter].push(pile);      else bytype[letter] = [pile];    }    // xxx existince is rather icky, but yay list comprehensions    this.dragDropTargets = [f for each(f in this.allpiles) if(f.canDrop)];    for each(var set in bytype)      for(i = 1; i != set.length; ++i) set[i].prev = set[i-1], set[i-1].next = set[i];    var p;    // xxx would be nice to kill all of these    this.piles = [p for each(p in all) if(p.isPile)];    this.cells = [p for each(p in all) if(p.isCell)];    this.reserves = [p for each(p in all) if(p.isReserve)];    this.foundations = [p for each(p in all) if(p.isFoundation)];    for(i in this.foundations) this.foundations[i].index = i;    this.stock = bytype.s ? bytype.s[0] : null;    this.waste = bytype.w ? bytype.w[0] : null;    this.foundation = bytype.f ? bytype.f[0] : null;    this.reserve = bytype.r ? bytype.r[0] : null;    this.loadPreferredFoundationSuits();  },
meta: 3385	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3385/e47caa955575dff800723e6b52a9b3557ed7b425/lib-game.js/clean/code/lib-game.js