+// Based on code from Tuertris hacked by mclien
+// https://hackaday.io/project/3708-trtris
+// http://mclien.de/files/tuertris/tuertris_sw.zip
+// Joel Lienhard  (joel@mclien.de  joel@sisam42.de)
+
+
 #include "application.h"
 #include "neopixel__spark_internet_button/neopixel__spark_internet_button.h"
 
 #define PIXEL_PIN      D0
+#define MODE_PIN       D1
+#define LEFT           D2
+#define RIGHT          D3
+#define DOWN           D4
+#define ROTATE         D5
+
+#define MAX_MODE        2
+
 #define PIXEL_TYPE     WS2811
 #define matrixx         5
 #define matrixy        10
 #define fallspeedorg  100
+#define debouncevalue 100
 
 int pos[2]                   = { matrixx-3, matrixy};
 int bricks[7][4][2]          = { {{ 0,-1}, {-1, 0}, {0, 0}, {1, 0}},  // 0


}

void show(){

  for(int i = 0; i < strip.numPixels(); i++){
    strip.setPixelColor(i, strip.Color(0, 0, 0));

int fullrow                  = 0;
int rowtodelete              = 0;
int gameover                 = 0;
int mode                     = 0;
int debounce                 = 0;
int currentColor[3]          = {0};

Adafruit_NeoPixel strip = Adafruit_NeoPixel( (matrixx * matrixy) , PIXEL_PIN, PIXEL_TYPE);
