rem:  cards = shuffle(cards); this.shuffled = cards.slice(0);   var easy = hardGame ? 0 : 1; for(r = 0; r != 4; r++) for(c = 13 - map[r].length + easy; c != 13; c++) rows[r][c].dealTo(cards, 0, 1); 
add:  this.shuffled = shuffle(cards); this.redo(); 
context:   perform: function() {    var hardGame = this.isHardGame;    Game.redealsRemaining--;    var cards = [];    var map = this.map = [[],[],[],[]];    var rows = Game.rows;    // remove cards    for(var r = 0; r != 4; r++) {      var row = rows[r];      var c = 0, pile = row[0], prv = null;      while(this.isPileComplete(pile, prv)) c++, prv = pile, pile = row[c];      for(; c != 13; c++) {        var card = row[c].lastChild;        if(card) card.parentNode.removeChild(card);        // in hard games we want the null's in the array too        if(card || hardGame) cards.push(card);        map[r].push(card);      }    }    // shuffle    cards = shuffle(cards);    this.shuffled = cards.slice(0); // copy for redo()    // deal.  in easy games the spaces go at the start of rows, in hard games they occur randomly    var easy = hardGame ? 0 : 1;    for(r = 0; r != 4; r++)      for(c = 13 - map[r].length + easy; c != 13; c++)        rows[r][c].dealTo(cards, 0, 1);  },
meta: 3385	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3385/ccc58b22055087a3daab6415a40db3d94a3fed96/montana.js/buggy/montana.js