<commit_before>var asteriskAttack = (function(aa) {

  var duration = 300;

  aa.animateLoadGame = function() {
    aa.updateScore();
    setClickHandlers();

    showFromRight(aa.dom.logo);
    showFromLeft(aa.dom.score);
    showFromRight(aa.dom.startBtn);
    showFromLeft(aa.dom.instructions);
    if (aa.retrieveScores()) {
      showFromRight(aa.dom.scoreboardLink);
    }
  };

  aa.animateStartGame = function() {
    resetScore();
    updateStartBtn();

    animateDefender(true);
    if (aa.stats.plays > 1) {
      hideToRight(aa.dom.gameOver);
    }
    hideToRight(aa.dom.startBtn);
    if (aa.retrieveScores()) {
      hideToLeft(aa.dom.scoreboardLink);
    }
    hideToLeft(aa.dom.instructions);
    showFromRight(aa.dom.quitInstructions);
  };

  aa.animateEndGame = function() {
    updateStartBtn();

    animateDefender(false);
    showFromRight(aa.dom.startBtn);
    showFromRight(aa.dom.gameOver);
    if (aa.retrieveScores()) {
      showFromLeft(aa.dom.scoreboardLink);
    }
    showFromLeft(aa.dom.instructions);
    hideToRight(aa.dom.quitInstructions);
  };

  function showScoreboard() {
    aa.updateScoreboard();
    hideToRight(aa.dom.score);
    hideToRight(aa.dom.startBtn);
    hideToRight(aa.dom.gameOver);
    hideToRight(aa.dom.scoreboardLink);
    hideToRight(aa.dom.instructions);
    hideToRight(aa.dom.background);
    showFromLeft(aa.dom.scoreboardHeader);
    showFromLeft(aa.dom.scoreboard);
    showFromLeft(aa.dom.scoreboardDone);
  }

  function hideScoreboard() {
    showFromRight(aa.dom.score);
    showFromRight(aa.dom.startBtn);
    if (aa.stats.plays >= 1) {
      showFromRight(aa.dom.gameOver);
    }
    showFromRight(aa.dom.scoreboardLink);
    showFromRight(aa.dom.instructions);
    showFromRight(aa.dom.background);
    hideToLeft(aa.dom.scoreboardHeader);
    hideToLeft(aa.dom.scoreboard);
    hideToLeft(aa.dom.scoreboardDone);
  }

  function showFromLeft(element) {
    var startPos = -(element.width() + 50);

    element.stop()
      .css({ 'left': startPos, 'right': 'auto', 'margin': '0 0 0 ' + (-(element.width()/2)) + 'px' })
      .show()
      .animate({ 'left': '' }, { duration: duration, queue: false });
  }

  function showFromRight(element) {
    var startPos = -(element.width() + 50);

    element.stop()
      .css({'right': startPos, 'left': 'auto', 'margin': '0 ' + (-(element.width()/2)) + 'px 0 0' })
      .show()
      .animate({ 'right': '' }, { duration: duration, queue: false });
  }

  function hideToLeft(element) {
    var endPos = -(element.width() + 50);

    element.animate({
      'left': endPos,
      'right': 'auto',
      'margin': '0 0 0 ' + (-(element.width()/2)) + 'px'
    },{
      duration: duration,
      queue: false,
      complete: function() {
        element.hide();
      }
    });
  }

  function hideToRight(element) {
    var endPos = -(element.width() + 50)
      , margin

    element.animate({
      'right': endPos,
      'left': 'auto',<commit_msg>Tweak to which side elements are shown/hidden<commit_after>var asteriskAttack = (function(aa) {

  var duration = 300;

  aa.animateLoadGame = function() {
    aa.updateScore();
    setClickHandlers();

    showFromRight(aa.dom.logo);
    showFromLeft(aa.dom.score);
    showFromRight(aa.dom.startBtn);
    showFromLeft(aa.dom.instructions);
    if (aa.retrieveScores()) {
      showFromRight(aa.dom.scoreboardLink);
    }
  };

  aa.animateStartGame = function() {
    resetScore();
    updateStartBtn();

    animateDefender(true);
    if (aa.stats.plays > 1) {
      hideToRight(aa.dom.gameOver);
    }
    hideToRight(aa.dom.startBtn);
    if (aa.retrieveScores()) {
      hideToRight(aa.dom.scoreboardLink);
    }
    hideToRight(aa.dom.instructions);
    showFromLeft(aa.dom.quitInstructions);
  };

  aa.animateEndGame = function() {
    updateStartBtn();

    animateDefender(false);
    showFromLeft(aa.dom.startBtn);
    showFromLeft(aa.dom.gameOver);
    if (aa.retrieveScores()) {
      showFromLeft(aa.dom.scoreboardLink);
    }
    showFromLeft(aa.dom.instructions);
    hideToRight(aa.dom.quitInstructions);
  };

  function showScoreboard() {
    aa.updateScoreboard();
    hideToRight(aa.dom.score);
    hideToRight(aa.dom.startBtn);
    hideToRight(aa.dom.gameOver);
    hideToRight(aa.dom.scoreboardLink);
    hideToRight(aa.dom.instructions);
    hideToRight(aa.dom.background);
    showFromLeft(aa.dom.scoreboardHeader);
    showFromLeft(aa.dom.scoreboard);
    showFromLeft(aa.dom.scoreboardDone);
  }

  function hideScoreboard() {
    showFromLeft(aa.dom.score);
    showFromLeft(aa.dom.startBtn);
    if (aa.stats.plays >= 1) {
      showFromLeft(aa.dom.gameOver);
    }
    showFromLeft(aa.dom.scoreboardLink);
    showFromLeft(aa.dom.instructions);
    showFromLeft(aa.dom.background);
    hideToRight(aa.dom.scoreboardHeader);
    hideToRight(aa.dom.scoreboard);
    hideToRight(aa.dom.scoreboardDone);
  }

  function showFromLeft(element) {
    var startPos = -(element.width() * 2);

    element.stop()
      .css({ 'left': startPos, 'right': 'auto', 'margin': '0 0 0 ' + (-(element.width()/2)) + 'px' })
      .show()
      .animate({ 'left': '' }, { duration: duration, queue: false });
  }

  function showFromRight(element) {
    var startPos = -(element.width() * 2);

    element.stop()
      .css({'right': startPos, 'left': 'auto', 'margin': '0 ' + (-(element.width()/2)) + 'px 0 0' })
      .show()
      .animate({ 'right': '' }, { duration: duration, queue: false });
  }

  function hideToLeft(element) {
    var endPos = -(element.width() * 2);

    element.css({ 'right': 'auto' })
    .animate({
      'left': endPos,
      'margin': '0 0 0 ' + (-(element.width()/2)) + 'px'
    },{
      duration: duration,
      queue: false,
      complete: function() {
        element.hide();
      }
    });
  }

  function hideToRight(element) {
    var endPos = -(element.width() * 2)
      , margin

    element
    .css({ 'left': 'auto' })
    .animate({
      'right': endPos,
{'fraction_non_alphanumeric': 0.1657486229344016, 'fraction_numerical': 0.007678183942580538, 'mean_word_length': 3.0241773002014773, 'pattern_counts': {'":': 0, '<': 3, '<?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': '320695', 'n_tokens_mistral': 2156, 'n_tokens_neox': 2035, 'n_words': 316}