 #include "SPI.h"
 #include "display.h"
 #include "tetris.h"
+#include "bug.h"
 #include "utils.h"
 
 

const int powerPin = 11;
const int power = 20;

DisplayWrapper display = DisplayWrapper(nLEDs, dataPin, clockPin, powerPin, power);
Tetris tetris = Tetris();

void setup() {
  Serial.begin(9600);

  display.show();
}

long previousMillis = 0;
const long interval = 1000 * 60 * 30;

void loop() {
  while (millis() - previousMillis < interval) {
    tetris.drawRandomTetrisGrid();
    delay(TETRIS_SPEED);
  }

  previousMillis = millis();

  while (millis() - previousMillis < interval) {
    environment.advance();
    environment.show();
    delay(BUG_SPEED);
  }

  previousMillis = millis();
}
