<commit_before>


/* alien setup for each level */ 
    var levelData = { 
     1:  [[0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [0,0,1,1,0,0,0,1,1,1,1],
          [0,0,1,1,0,0,0,2,2,0,0],
          [1,1,1,1,0,0,0,2,2,0,0],
          [1,0,1,1,0,0,0,1,1,1,1],
          [1,1,1,1,2,2,2,0,0,2,1],
          [1,0,0,1,0,0,0,0,0,2,1],
          [1,1,1,1,0,0,0,2,2,2,1]],
     2:  [[0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [2,2,2,2,2,2,2,2,2,2,2],
          [2,2,2,2,2,2,2,2,2,2,2],
          [1,0,2,2,2,2,2,2,2,0,1],
          [1,0,1,1,1,1,1,1,1,0,1],
          [0,0,0,1,1,1,1,1,0,0,0],
          [0,0,0,0,1,1,1,0,0,0,0],
          [0,0,0,0,0,1,0,0,0,0,0]] };

  var spriteData = {
    'alien1': { sx: 0,  sy: 0,  w: 23, h: 18, cls: Alien, frames: 2 },
    'alien2': { sx: 0,  sy: 18, w: 23, h: 18, cls: Alien, frames: 2 },
    'player': { sx: 0,  sy: 55/*36*/, w: 45/*23*/, h: 33/*27*/, cls: Player ,frames: 2 },
    'missile': { sx: 0,  sy: 89, w: 13,  h: 14, cls: Missile },
    'emissile': { sx: 15,  sy: 90, w: 5,  h: 14, cls: Emissile },

      
  }

/* text configuration for start, game over and win */    
  function startGame() {
    var screen = new GameScreen("Space Invaders GLHF","press space to start",
                                 function() {
                                     Game.loadBoard(new GameBoard(1));
                                     
                                 });
    Game.loadBoard(screen);
    Game.loop();
     
      /* game background song */
     myAudio = new Audio('sound/spacebattle2.wav'); 
if (typeof myAudio.loop == 'boolean')
{
    myAudio.loop = true;
}
/*else
{
    myAudio.addEventListener('ended', function() {
        this.currentTime = 0;
        this.play();
    }, false);
}*/
myAudio.play();
  }

//end-game function
  function endGame() {
    var screen = new NewGameScreen("GG Game Over","(press enter to restart)",
                                 function() {
                                     Game.loadBoard(new GameBoard(1));
                                     myAudio.play();
                                     myAudio2.pause();
                                 });
    Game.loadBoard(screen);
      //pause ingame background music
      myAudio.pause();
      //loop for troll teemo endgame music
       myAudio2 = new Audio('sound/teemogg.wav'); 
      if (typeof myAudio2.loop == 'boolean')
      {
        myAudio2.loop = true;
      }
     /* else
      {
          myAudio.addEventListener('ended', function() {
            this.currentTime = 0;
            this.play();
        }, false);<commit_msg>test2<commit_after>


/* alien setup for each level */ 
    var levelData = { 
     1:  [[0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [0,0,1,1,0,0,0,1,1,1,1],
          [0,0,1,1,0,0,0,2,2,0,0],
          [1,1,1,1,0,0,0,2,2,0,0],
          [1,0,1,1,0,0,0,1,1,1,1],
          [1,1,1,1,2,2,2,0,0,2,1],
          [1,0,0,1,0,0,0,0,0,2,1],
          [1,1,1,1,0,0,0,2,2,2,1]],
     2:  [[0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [0,0,0,0,0,0,0,0,0,0,0],
          [2,2,2,2,2,2,2,2,2,2,2],
          [2,2,2,2,2,2,2,2,2,2,2],
          [1,0,2,2,2,2,2,2,2,0,1],
          [1,0,1,1,1,1,1,1,1,0,1],
          [0,0,0,1,1,1,1,1,0,0,0],
          [0,0,0,0,1,1,1,0,0,0,0],
          [0,0,0,0,0,1,0,0,0,0,0]] };

  var spriteData = {
    'alien1': { sx: 0,  sy: 0,  w: 23, h: 18, cls: Alien, frames: 2 },
    'alien2': { sx: 0,  sy: 18, w: 23, h: 18, cls: Alien, frames: 2 },
    'player': { sx: 0,  sy: 55/*36*/, w: 45/*23*/, h: 33/*27*/, cls: Player ,frames: 2 },
    'missile': { sx: 0,  sy: 89, w: 13,  h: 14, cls: Missile },
    'emissile': { sx: 15,  sy: 90, w: 5,  h: 14, cls: Emissile },

      
  }

/* text configuration for start, game over and win */    
  function startGame() {
    var screen = new GameScreen("Space Invaders GLHF","press space to start",
                                 function() {
                                     Game.loadBoard(new GameBoard(1));
                                     
                                 });
    Game.loadBoard(screen);
    Game.loop();
     
      /* game background song */
     myAudio = new Audio('sound/spacebattle2.wav'); 
if (typeof myAudio.loop == 'boolean')
{
    myAudio.loop = true;
}
/*else
{
    myAudio.addEventListener('ended', function() {
        this.currentTime = 0;
        this.play();
    }, false);
}*/
myAudio.play();
  }

//end-game function
  function endGame() {
    var screen = new GameScreen("GG Game Over","(press enter to restart)",
                                 function() {
                                     Game.loadBoard(new GameBoard(1));
                                     myAudio.play();
                                     myAudio2.pause();
                                 });
    Game.loadBoard(screen);
      //pause ingame background music
      myAudio.pause();
      //loop for troll teemo endgame music
       myAudio2 = new Audio('sound/teemogg.wav'); 
      if (typeof myAudio2.loop == 'boolean')
      {
        myAudio2.loop = true;
      }
     /* else
      {
          myAudio.addEventListener('ended', function() {
            this.currentTime = 0;
            this.play();
        }, false);
{'fraction_non_alphanumeric': 0.2084761045987376, 'fraction_numerical': 0.10766456266907123, 'mean_word_length': 1.6599520383693045, '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': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2911813', 'n_tokens_mistral': 2417, 'n_tokens_neox': 2308, 'n_words': 369}