 
     delay(ish);
 }
-

void loop() {
    allOff();



    runClassic();
  int blinkMin = 1;
  int blinkMax = 0;
  int possibility = random(0, 100);

  if (possibility > 95) { // rare things, only happen 5% of the time
    switch(random(0, 2)) {
    case 0:
      flickerPattern(random(0, 2), random(0, 2));
      blinkMin = 0;
      break;
    case 1:
      blinkAllOnRandom();
      blinkMax = 3;
      break;
    }
  } else if (possibility > 70) { // less rare things, happen 25% of the time
    if (random(0, 200) == 0) {
      runBackgroundPattern();
      runLetterPattern();
    } else {
      blinkMax = 5;

      runLetterPattern();

      for (int i = 0; i < random(1, 5); i++) {
        runBackgroundPattern();

        if (random(0, 10) == 0) {
            blinkLetters(random(1, blinkMax));
        }
      }
    }
  } else if (possibility > 20) { // the classic coca-cola sign pattern, happen 50% of the time
        runClassic();

        blinkMax = 3;
  } else { // tracer, happens 20% of the time
    runTracer();

    blinkMax = 1;
  }

    blinkLetters(random(blinkMin, blinkMax));



void runTracer() {
    for (int i = 0; i < sizeof(background); i++) {
        digitalWrite(background[i], PATTERN_ON);
        delay(none);
    }
    for (int i = 0; i < sizeof(letters); i++) {
        digitalWrite(Lights[i], PATTERN_ON);
        delay(250);
        digitalWrite(Lights[i], PATTERN_OFF);
        delay(250);
    }
    for (int j = 0; j < 3; j++) {

        for (int i = 0; i < sizeof(letters); i++) {
            digitalWrite(Lights[i], PATTERN_ON);
            delay(none);
        }
        delay(250);
        for (int i = 0; i < sizeof(letters); i++) {
            digitalWrite(Lights[i], PATTERN_OFF);
            delay(none);
        }
        delay(250);

    }
    delay(250);
}

void runLetterPattern() {
    // if new patterns are added, add a new case statement, and bump up the max random value by one
    switch (random(0, 3)) {
    case 0: { lettersOnLeftToRight(); break; }
    case 1: { blinkLetters(random(5, 10)); break; }
    case 2: {  blinkLettersOnRandom(); break; }
    default: { break; }
    }
}

void runBackgroundPattern() {
    switch (random(0, 5)) {
    case 0: { classicBackground(); break; }
    case 1: { insideOutOutsideInBackground(); break; }
    case 2: { racingOnLeftToRightBackground(); break; }
    case 3: { blinkBackground(random(5, 10)); backgroundAllOn(); break; }
    case 4: { blinkBackgroundOnRandom(); break; }
    }
}

// Arduino loop
