 
   if(p1.X >= maxX || p1.X <= minX || p1.Y >= maxY || p1.Y <= minY)
   {
-    gameRunning = false; 
+    EndGame();
   }
 
   //Check if hit tail

        {
        if(p1.Moves[i].X == p1.X && p1.Moves[i].Y == p1.Y)
        {
          gameRunning = false;
        }
      }
  }

  }
}

void EndGame()
{
    arduboy.tunes.tone(200, 200);
    delay(400);
    arduboy.tunes.tone(100, 400);
    delay(600);
    arduboy.tunes.tone(50, 2000);
    gameRunning = false;
}

void CollisionDetection()
{

