<commit_before>var game = function() {
  this.frameNumber = 0;
  this.prevFrame = this.frameNumber-1;
  this.frames = [frame1 = new frame,
                 frame2 = new frame,
                 frame3 = new frame,
                 frame4 = new frame,
                 frame5 = new frame,
                 frame6 = new frame,
                 frame7 = new frame,
                 frame8 = new frame,
                 frame9 = new frame,
                 frame10 = new frame];

  game.prototype.addScore = function(score) {
    try{
    this.frames[this.frameNumber].scoreInput(score);
    }
    catch(e){
      alert("You have already entered two scores")
    }
    
  };
  

  game.prototype.nextFrame = function() {
    this.frameNumber += 1;
    return "Frame Number " + (this.frameNumber + 1);
  };

 game.prototype.prevFrame = function() {
    this.frameNumber -= 1;
    return "Frame Number " + (this.frameNumber + 1);
  };

};<commit_msg>Working strike addition<commit_after>var game = function() {
  var frameNumber = 0;
  this.frames = [frame1 = new frame,
                 frame2 = new frame,
                 frame3 = new frame,
                 frame4 = new frame,
                 frame5 = new frame,
                 frame6 = new frame,
                 frame7 = new frame,
                 frame8 = new frame,
                 frame9 = new frame,
                 frame10 = new frame];

  game.prototype.addScore = function(score) {
    try{
    this.frames[frameNumber].scoreInput(score);
    }
    catch(e){
      alert("You have already entered two scores")
    }
    var prevFrame = frameNumber-1;
    if(prevFrame > 0){
    if(this.frames[frameNumber].full){
      if(this.frames[prevFrame].strike){
        this.frames[prevFrame].total += this.frames[frameNumber].total
      }
    }
  }
    
  };
  

  game.prototype.nextFrame = function() {
    frameNumber += 1;
    return "Frame Number " + (frameNumber + 1);
  };

 game.prototype.prevFrame = function() {
    frameNumber -= 1;
    return "Frame Number " + (frameNumber + 1);
  };

};
{'fraction_non_alphanumeric': 0.1151603498542274, 'fraction_numerical': 0.017006802721088437, 'mean_word_length': 1.7824324324324323, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4684838', 'n_tokens_mistral': 609, 'n_tokens_neox': 588, 'n_words': 144}