rem: for(var i = 0; i < 8; i++){ 
add: for(i = 0; i < 8; i++){ 
context: Mod3.deal = function() {  // get 2 decks, remove the aces, shuffle  var cards = this.getCardDecks(2);  cards.splice(91,1); cards.splice(78,1); cards.splice(65,1);  cards.splice(52,1); cards.splice(39,1); cards.splice(26,1);  cards.splice(13,1); cards.splice(0, 1);  this.clearGame();  var possible = false;  while( !possible ){ // Deal until we get came with at least a sporting chance    var cardindex = cards.length - 1;    cards = this.shuffle(cards);    this.score = 0;    var inplace = new Array(3); // three target rows    var inplay = new Array(3);    for(var targetRow = 0; targetRow <3; targetRow++ ){      inplace[targetRow] = Array(4); // four suits      inplay[targetRow] = Array(4);    }    for(var row = 0; row <3; row++){      for(var i = 0; i < 8; i++){        var currCard = cards[cardindex--];        if( currCard.number() == row+2 ){          inplace[row][currCard.suit()-SPADE] = true;          this.score += CARD_IN_PLACE;        } else {          inplay[((currCard.number()-2)%3)][currCard.suit()-SPADE] = true;        }      }    }    // We have cards in place but still need cards to play on them    for(var base = 0; base<3; base++){      for(var suit = SPADE; suit <= CLUB; suit++){        // XXX js strict warnings here        if( inplace[base][suit] && inplay[base][suit] ){          possible = true; // yeah!          break;        }      }    }  }  // Now that we have ok cards, deal them out  for(var i = 0; i < 24; i++) this.dealToStack(cards,this.foundations[i],0,1);  for(var i = 0; i < 8; i++) this.dealToStack(cards,this.stacks[i],0,1);  this.dealToStack(cards,this.stock,cards.length,0);  this.updateScoreDisplay();};
meta: 3385	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3385/2992d7bb8677e70fdb70cf041bc99415e05234f1/mod3.js/clean/mod3.js