<commit_before>scoreGame = function (game) {
  //most cards
  //most coins
  //seven of coins
  //primera
  //scopa

  game.players[game.lastScorer].pile.push.apply(game.players[game.lastScorer].pile, game.table);
  game.table = [];
  game.inProgress = false;
  game.finished = new Date();

  var mostCards = ['x', -1], 
      mostCoins = ['x', -1], 
      highestPrimera = ['x', -1];

  Object.keys(game.players).forEach(function (id) {
    var pile = game.players[id].pile

    var cardCount = pile.length;
    if (cardCount > mostCards[1]) {
      mostCards = [id, cardCount];
    } else if (cardCount === mostCards[1]) {
      mostCards = false;
    }

    if(hasSetteBello(pile)) {
      game.players[id].score.SetteBello = 1;
    }

    var primera = getPrimera(pile);
    if (primera > highestPrimera[1]) {
      highestPrimera = [id, primera];
    } else if (primera === highestPrimera[1]) {
      highestPrimera = false;
    }

  });

  if (mostCards) game.players[mostCards[0]].score.mostCards = 1;
  if (mostCoins) game.players[mostCoins[0]].score.mostCoins = 1;
  if (highestPrimera) game.players[highestPrimera[0]].score.primera = 1;

  var highest = ['x', -1];

  Object.keys(game.players).forEach(function (id) {
    var s = game.players[id].score;

    game.players[id].score.total = s.mostCards + s.mostCoins + s.primera + s.setteBello + s.scopa;
 
    if ( game.players[id].score.total > highest [1]) {
      highest = [id, game.players[id].score.total];
    } else if (game.players[id].score.total === highest[1]) {
      highest = false;<commit_msg>Added coinCount logic to gameScoring.js<commit_after>scoreGame = function (game) {
  //most cards
  //most coins
  //seven of coins
  //primera
  //scopa

  game.players[game.lastScorer].pile.push.apply(game.players[game.lastScorer].pile, game.table);
  game.table = [];
  game.inProgress = false;
  game.finished = new Date();

  var mostCards = ['x', -1], 
      mostCoins = ['x', -1], 
      highestPrimera = ['x', -1];

  Object.keys(game.players).forEach(function (id) {
    var pile = game.players[id].pile

    var cardCount = pile.length;
    if (cardCount > mostCards[1]) {
      mostCards = [id, cardCount];
    } else if (cardCount === mostCards[1]) {
      mostCards = false;
    }

    var coinCount = suit('Coins', pile).length;
    if (coinCount > mostCoins[1]) {
      mostCoins = [id, coinCount];
    } else if (coinCount === mostCoins[1]) {
      mostCoins = false;
    }

    if(hasSetteBello(pile)) {
      game.players[id].score.SetteBello = 1;
    }

    var primera = getPrimera(pile);
    if (primera > highestPrimera[1]) {
      highestPrimera = [id, primera];
    } else if (primera === highestPrimera[1]) {
      highestPrimera = false;
    }

  });

  if (mostCards) game.players[mostCards[0]].score.mostCards = 1;
  if (mostCoins) game.players[mostCoins[0]].score.mostCoins = 1;
  if (highestPrimera) game.players[highestPrimera[0]].score.primera = 1;

  var highest = ['x', -1];

  Object.keys(game.players).forEach(function (id) {
    var s = game.players[id].score;

    game.players[id].score.total = s.mostCards + s.mostCoins + s.primera + s.setteBello + s.scopa;
 
    if ( game.players[id].score.total > highest [1]) {
      highest = [id, game.players[id].score.total];
    } else if (game.players[id].score.total === highest[1]) {
      highest = false;
{'fraction_non_alphanumeric': 0.16607142857142856, 'fraction_numerical': 0.010714285714285714, 'mean_word_length': 3.015531660692951, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '3984901', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1216, 'n_words': 235}