<commit_before>define([],function(){
   // Instance stores a reference to the Singleton
  var instance;

  function init() {
    function evaluatePoints(runningTotal, player){
      if(runningTotal == 15)
        player.score += 2;
    }
    function exceeds31(runningTotal, card){
      return ((runningTotal + card.value) > 31);
    }
    function evaluatePair(){}
    function evaluateRun(){}
    return {
      runningValue: 0,
      currentCards: [],
      evaluateCard: function(player, card) {
        console.log(player.name + ': ' + card.value)
        this.runningValue += card.value;
        evaluatePoints(this.runningValue, player);
        if(exceeds31(this.runningValue, card)){
          throw new Error('Exceeds 31');
        }
        console.log(this.currentTableRunningValue);
        return this.currentCards.push(card);
      },
      evaluatePlayableCards: function(player){
        var playableCards = [];
        player.hand.forEach(function(card){
          if(card.value < (31 - this.runningValue))
            playableCards.push(card);
        }.bind(this))

        return playableCards;
      }
    };
  };

  return {
    // Get the Singleton instance if one exists
    // or create one if it doesn't
    getInstance: function () {
      if ( !instance ) {<commit_msg>order was wrong.. write test for this case!<commit_after>define([],function(){
   // Instance stores a reference to the Singleton
  var instance;

  function init() {
    function evaluatePoints(runningTotal, player){
      if(runningTotal == 15)
        player.score += 2;
    }
    function exceeds31(runningTotal, card){
      return ((runningTotal + card.value) > 31);
    }
    function evaluatePair(){}
    function evaluateRun(){}
    return {
      runningValue: 0,
      currentCards: [],
      evaluateCard: function(player, card) {
        console.log(player.name + ': ' + card.value)
        if(exceeds31(this.runningValue, card)){
          throw new Error('Exceeds 31');
        }
        this.runningValue += card.value;
        
        evaluatePoints(this.runningValue, player);
        console.log('runningTotal: ' + this.runningValue);
        return this.currentCards.push(card);
      },
      evaluatePlayableCards: function(player){
        var playableCards = [];
        player.hand.forEach(function(card){
          if(card.value < (31 - this.runningValue))
            playableCards.push(card);
        }.bind(this))

        return playableCards;
      }
    };
  };

  return {
    // Get the Singleton instance if one exists
    // or create one if it doesn't
    getInstance: function () {
      if ( !instance ) {
{'fraction_non_alphanumeric': 0.12216338880484115, 'fraction_numerical': 0.01059001512859304, 'mean_word_length': 2.3823529411764706, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4610897', 'n_tokens_mistral': 775, 'n_tokens_neox': 738, 'n_words': 172}