 }
   
 void alloff() {
-  for (int i = NUM_LEDS; i >=0; i--) {
+  for (int i = NUM_LEDS-1; i >=0; i--) {
     leds[i]=CRGB::Black;
     delay(10);
     FastLED.show();

  if (pattern=="game_over"){
    digitalWrite(MOSFET_GATE,HIGH);
    FastLED.setBrightness(LOW_BRIGHTNESS); 
    for (int i = NUM_LEDS; i >=0; i--){
      leds[i]=CRGB::Red;
    }
  }
  
  if (pattern=="off"){
    for (int i = NUM_LEDS; i >=0; i--) {
      //leds[i]=CRGB::Black;
      leds[i].nscale8(230);
    }



void LEDS_ON(int count, int record){
    for (int i = NUM_LEDS-1; i >=0; i--) {
      if (i<=NUM_LEDS-count){leds[i]=CRGB::Black;}
      //else {leds[i]=CRGB::Green;}
      else {leds[i]=CHSV(gHue, 255, 255);}
