<commit_before>define(['/socket.io/socket.io.js'], function () {
  var Score = function () {
    this.moves = []
  };

  Score.prototype.init = function (x, y) {
    this.moves = [];
  };

  Score.prototype.submit = function(){
    var socket = io.connect();
    socket.emit('scoreSubmit', {score: this.calculate()});
  };

  Score.prototype.calculate = function(){
    var total = 0;
    for(var i = 0; i < this.moves.length; i++){
      for (var j = 0; j < this.moves[i].length; j++ ) {
        // * j is a basic combo modifier, the deeper into the array's
        // second dimension we go, the bigger the combo was
        var point = this.moves[i][j];
        if (point > 0)
          total += (point + 25) * (j + 1);
      }
    }

    return total;
  };
  return Score;
});
<commit_msg>Revised scoring logic<commit_after>define(['/socket.io/socket.io.js'], function () {
  var Score = function () {
    this.moves = []
  };

  Score.prototype.init = function (x, y) {
    this.moves = [];
  };

  Score.prototype.submit = function(){
    var socket = io.connect();
    socket.emit('scoreSubmit', {score: this.calculate()});
  };

  Score.prototype.calculate = function(){
    var total = 0;
    for(var i = 0; i < this.moves.length; i++){
      for (var j = 0; j < this.moves[i].length; j++ ) {
        // * j is a basic combo modifier, the deeper into the array's
        // second dimension we go, the bigger the combo was
        var point = this.moves[i][j];
        if (point > 0){
          if (point > 10)
            point = point * 1.5;
          else if (point > 20)
            point = point * 2;

          total += ((point * 10)) * (j + 1);
        }
      }
    }

    return total;
  };
  return Score;
});

{'fraction_non_alphanumeric': 0.16714864083285136, 'fraction_numerical': 0.012145748987854251, 'mean_word_length': 2.0837789661319075, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4395977', 'n_tokens_mistral': 599, 'n_tokens_neox': 561, 'n_words': 159}