<commit_before>$(document).ready(function(){
  var $card = $(".card").not(".cat-card");

  $card.on("click", function(){
    var $this = $(this);
    var $other = $card.not($this).not(".played");
    var $disabled = $this.hasClass("disabled");
    var $question = $this.children().filter(".question");
    var $answer = $this.children().filter(".answer");
    var $value = $this.children().filter(".value");

    if (!$disabled && $value.attr("style") == null){
      $other.addClass("disabled");
      $this.addClass("chosen");
      $value.attr("style", "display: none");
      $question.attr("style", "display: block");
      $("button").removeClass("disabled");
    } else if (!$disabled && $question.attr("style") == "display: block"){
      $question.attr("style", "display: none");
      $answer.attr("style", "display: block");
    } else if (!$disabled && $answer.attr("style") == "display: block"){
      $answer.attr("style", "display: none");
      $this.addClass("disabled played");
      $other.removeClass("disabled");
      $("button").addClass("disabled");
    }
  });

});<commit_msg>add points variable with scope outside card events<commit_after>$(document).ready(function(){
  var $card = $(".card").not(".cat-card");
  var $points;

  $card.on("click", function(){
    var $this = $(this);
    var $other = $card.not($this).not(".played");
    var $disabled = $this.hasClass("disabled");
    var $question = $this.children().filter(".question");
    var $answer = $this.children().filter(".answer");
    var $value = $this.children().filter(".value");

    if (!$disabled && $value.attr("style") == null){
      $other.addClass("disabled");
      $this.addClass("chosen");
      $value.attr("style", "display: none");
      $question.attr("style", "display: block");
      $("button").removeClass("disabled");
      $points = $value.text();
    } else if (!$disabled && $question.attr("style") == "display: block"){
      $question.attr("style", "display: none");
      $answer.attr("style", "display: block");
    } else if (!$disabled && $answer.attr("style") == "display: block"){
      $answer.attr("style", "display: none");
      $this.addClass("disabled played");
      $other.removeClass("disabled");
      $("button").addClass("disabled");
    }
  });

});
{'fraction_non_alphanumeric': 0.23917796239615216, 'fraction_numerical': 0.0, 'mean_word_length': 3.80672268907563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '320698', 'n_tokens_mistral': 678, 'n_tokens_neox': 677, 'n_words': 135}