#include <FastLED_NeoMatrix.h>

const uint8_t kMatrixWidth = 64;
const uint8_t kMatrixHeight = 32;

#define NUM_LEDS    (kMatrixWidth * kMatrixHeight)
#define LED_PIN     2
#define COLOR_ORDER GRB
#define CHIPSET     WS2811
#define BRIGHTNESS  200

CRGB leds[NUM_LEDS];

bool buttons[4];
bool buttonsHistory[4];

const unsigned long Enemy1movesInterval = 250;
unsigned long  previousTime = 0;

uint32_t enemy1 [72] = {
	// 'enemy1 8 x 9 pixek, 9x8px
	0x00000000, 0x00000000, 0x00000000, 0x00efe4b0, 0x00efe4b0, 0x00000000, 0x00ed1c24, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00efe4b0, 0x00efe4b0, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 
	0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00880015, 0x00000000, 0x00000000, 
	0x00ed1c24, 0x00000000, 0x00000000, 0x00ed1c24, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00ed1c24, 0x00000000, 0x00000000, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00000000, 0x00000000, 
	0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000
};
// enemy1 variables
unsigned int enemy1posX = 51;
unsigned int enemy1posY = 21;

/*
*** Idea for saving graphics ***
To convert graphics to arrays you can use https://javl.github.io/image2cpp/ with the following settings:
- Background color: Black
- Brightness / alpha threshold: 255
- Code output format: Arduino code, single bitmap
- Draw mode: Horizontal, 3 bytes per pixel (rgb888)
*/

// Example graphics
uint32_t ninja [64] = {
	// 'ninja 8x8, 8x8px
	0x00000000, 0x00000000, 0x00000000, 0x00b97a57, 0x00b97a57, 0x00000000, 0x00000000, 0x00000000, 
	0x00ffffff, 0x00ffffff, 0x00000000, 0x00b97a57, 0x00b97a57, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00c3c3c3, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000
};
// ninja variables
unsigned int ninjaposX = 5;
unsigned int ninjaposY = 21;

uint32_t ninjakick [64] = {
	// 'ninjakick, 8x8px
	0x00000000, 0x00000000, 0x00b97a57, 0x00b97a57, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00b97a57, 0x00b97a57, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00b97a57, 
	0x00000000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00ffffff, 0x00c3c3c3, 0x00ffffff, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00ffffff, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 
	0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000
};



uint32_t ninjasprungkick [64] = {
	// 'ninja sprungkick 8x8, 8x8px
	0x00000000, 0x00b97a57, 0x00b97a57, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00b97a57, 0x00b97a57, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00c3c3c3, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00ffffff, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00b97a57, 0x00000000, 
	0x00ffffff, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 
	0x00b97a57, 0x00000000, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00c3c3c3, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b97a57, 0x00000000, 0x00000000, 0x00b97a57
};

// Timer variables
unsigned long sysTime;

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

uint32_t tutorial [1344] = {
	// 'tutorial + press key to start 64 x 22, 64x22px
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00040bff, 0x00040bff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00880015, 0x00000000, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00040bff, 0x00040bff, 0x00040bff, 0x00040bff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00040bff, 0x00040bff, 0x00040bff, 0x00040bff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00040bff, 0x00040bff, 0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00fff200, 0x00fff200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00ffff2d, 0x00ffff2d, 0x00ffff2d, 0x00ffff2d, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00ffff2d, 0x00ffff2d, 0x00ffff2d, 0x00ffff2d, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ffff2d, 0x00ffff2d, 0x00000000, 0x00000000, 0x00187e37, 0x00187e37, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00187e37, 0x00187e37, 0x00187e37, 0x00187e37, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00b9b9b9, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00187e37, 0x00187e37, 0x00187e37, 0x00187e37, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00187e37, 0x00187e37, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
};
//TUTORIAL1 variables
unsigned int tutorialposX = 0;
unsigned int tutorialposY = 0;

  

FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection(UncorrectedColor);
FastLED.setBrightness(BRIGHTNESS);

drawGraphics(tutorial ,64, 32, tutorialposX, tutorialposY);
  FastLED.show();

  for (int i = 3; i < 7; i++) {
    pinMode(i, INPUT_PULLUP);
  }

  /*
  *** Color calc example ***

  uint32_t exampleColor = 0xFFF00F;

  Color:        Red      Green    Blue
  HEX:          FF       F0       0F
  BIN:          11111111 11110000 00001111
  
  Isolating   >> 16 (Bit shift 16 bits to the right)
  Red:                            11111111

  Isolating   >> 8 & 0xFF (Bit shift 8 bits to the right and mask 8 least significant bits)
  Green:      & 00000000 00000000 11111111       
                                  11110000

  Isolating   & 0xFF (Mask 8 least significant bits)
  Blue:       & 00000000 00000000 11111111
                                  00001111
  */

  
  // Draw graphics (see drawGraphics function down below)
  // drawGraphics(array, breite, hoehe, x-koord, y-koord);




  //Color a single pixel
  leds[xy(0,21)] = CRGB(0, 0, 0);
  leds[xy(3,21)] = CRGB(0, 0, 0);
  leds[xy(4,21)] = CRGB(0, 0, 0);
  FastLED.show();
}

void loop() {

  
uint32_t arena[2048] = {
	// 'arena 64 x32 vesuch 2, 64x32px
	0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 
	0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 
	0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 
	0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 
	0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 
	0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00b97a57, 0x00b97a57, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00ffffff, 0x00880015, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00efe4b0, 0x00efe4b0, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00b97a57, 0x00b97a57, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00ffffff, 0x00880015, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00efe4b0, 0x00efe4b0, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00b97a57, 0x00ffffff, 0x00c3c3c3, 0x00b97a57, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00efe4b0, 0x00880015, 0x00ed1c24, 0x00efe4b0, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00c3c3c3, 0x00c3c3c3, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00ed1c24, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00880015, 0x00880015, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00ed1c24, 0x00ed1c24, 0x00ed1c24, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00c3c3c3, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00880015, 
	0x00880015, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00880015, 
	0x00880015, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00b97a57, 0x00880015, 
	0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015, 0x00880015
};

unsigned int arenaposX = 0;
unsigned int arenaposY = 0;




  sysTime = micros();

// Read buttons and save values to array
readButtons();

// buttonPressedContinously has "buttonReadInterval" as parameter. Try values between 10-1000ms to see the effect.
int button = buttonPressedContinously(10);

                                                                        
uint32_t three [35] = {
	// '3 5x7, 5x7px
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
};

uint32_t two [35] = {
	// '2 5x7, 5x7px
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 
	0x00000000, 0x00000000, 0x00ffffff, 0x00ffffff, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
};

uint32_t one [35] = {
	// '1 5x7, 5x7px
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00ffffff, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 
	0x00000000, 0x00000000, 0x00ffffff, 0x00000000, 0x00000000, 
	0x00000000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00000000, 
	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
};

unsigned int ninjanumberposX = 13;
unsigned int ninjanumberposY = 4;

unsigned int enemynumberposX = 46;
unsigned int enemynumberposY = 4;


//                                                                              enemy1 bewegt sich

unsigned long currentTime  =  millis();

if(currentTime - previousTime >= Enemy1movesInterval) {
    

enemy1posX--;
drawGraphics(enemy1, 9, 8, enemy1posX, enemy1posY);



previousTime = currentTime;

}


/*
if (  ninjaposX == enemy1posX-5|| ninjaposX == enemy1posX-6||ninjaposX == enemy1posX-7||ninjaposX == enemy1posX-8){ 
        FastLED.clear();
        drawGraphics(ninjakick, 8, 8, ninjaposX, ninjaposY);
        //enemygetroffen = true;
        delay(1000);
*/
// Wenn Ninja vor Enemy steht und schlägt passiert was
 if ( button == 3){ //ninjaposX == enemy1posX-8 ==
 if (ninjaposX == enemy1posX-8) {
        FastLED.clear();
        drawGraphics(two, 5, 7, enemynumberposX, enemynumberposY); 
        drawGraphics(ninjakick, 8, 8, ninjaposX, ninjaposY);
        //enemygetroffen = true;
        delay(1000);
        }
        }
//wenn ninja auf position in enemy1 ist, dann ninja ein herz weniger danach neuer enemy1
//wenn enemy1 getroffen wird enem1 2 herzen, wenn enemy1 in der if schleife nochmal getroffen wird 1 herz und danach win animation
//drawGraphics(two, 5, 7, enemynumberposX, enemynumberposY); 
//drawGraphics(three, 5, 7, ninjanumberposX, ninjanumberposY); 
//drawGraphics(three, 5, 7, enemynumberposX, enemynumberposY); 
//drawGraphics(two, 5, 7, enemynumberposX, enemynumberposY); 


/*
}
}
void fillMatrix(CRGB color) {
  for (int i = 0; i < kMatrixWidth * kMatrixHeight; i++) {
    leds[i] = color;
  }
  FastLED.show();
*/

if (button > 0) { 
   FastLED.clear();

    switch (button) {
      case 1:
        //                                                             sprungkick
        //if sprungkick 4 pixel vorm gegner dann nur noch2 herzen 
        ninjaposY--;
        ninjaposY--;
        ninjaposY--;
        ninjaposX++;
        FastLED.clear();
        ninjaposY--;
        ninjaposY--;
        ninjaposY--;
        ninjaposX++;
        drawGraphics(ninjasprungkick, 8, 8, ninjaposX, ninjaposY);
        drawGraphics(arena ,64, 32, arenaposX, arenaposY);
        drawGraphics(enemy1, 9, 8, enemy1posX, enemy1posY);
        ninjaposY++;
        ninjaposY++;
        ninjaposY++;
        ninjaposX++;
        ninjaposX++;
        ninjaposX++;
        ninjaposX++;
        drawGraphics(ninjasprungkick, 8, 8, ninjaposX, ninjaposY);
        drawGraphics(arena ,64, 32, arenaposX, arenaposY);
        drawGraphics(enemy1, 9, 8, enemy1posX, enemy1posY);
        
        if (  ninjaposX == enemy1posX-6||ninjaposX == enemy1posX-6||ninjaposX == enemy1posX-7||ninjaposX == enemy1posX-8){ 
        drawGraphics(two, 5, 7, enemynumberposX, enemynumberposY); 
        drawGraphics(enemy1, 9, 8, enemy1posX, enemy1posY);
        drawGraphics(ninjasprungkick, 8, 8, ninjaposX, ninjaposY);
        //enemygetroffen = true;
        delay(1000);
        break;
        }

        ninjaposY++;
        ninjaposY++;
        ninjaposY++;
        ninjaposX++;
        ninjaposX++;
        drawGraphics(ninjasprungkick, 8, 8, ninjaposX, ninjaposY);
        drawGraphics(arena ,64, 32, arenaposX, arenaposY);
        drawGraphics(enemy1, 9, 8, enemy1posX, enemy1posY);
        break;

      case 2:
        //                                                              move left
        ninjaposX--;
        ninjaposX--;
        ninjaposX--;
        break;
      case 3:
       //                                                              kick
        drawGraphics(ninjakick, 8, 8, ninjaposX, ninjaposY);                                                     
        break;
      case 4:
        //                                                              move right
        ninjaposX++;
        ninjaposX++;
        ninjaposX++;
        break;
    } 
    drawGraphics(arena ,64, 32, arenaposX, arenaposY);
    drawGraphics(enemy1, 9, 8, enemy1posX, enemy1posY);
    drawGraphics(ninja, 8, 8, ninjaposX, ninjaposY);
  //printButtons();
  }
}



void drawGraphics(uint32_t * graphicsArray, uint32_t width, uint32_t height, uint32_t xCoord, uint32_t yCoord) {
  // In order to draw images you need width, height, x and y coords of the graphic.
  // I recommend creating objects for graphics with this data as attributes.

  
  for (int h = 0; h < height; h++) {
    for (int w = 0; w < width; w++) {

      // Access graphics array
      uint32_t arrayIndex = w + (h * width);
      uint32_t color = graphicsArray[arrayIndex];

      // Bit shifting and masking
      uint8_t red   =  color >> 16;
      uint8_t green = (color >> 8) & 0xFF;
      uint8_t blue  =  color & 0xFF;

      // Write to leds array
      leds[xy(xCoord + w, yCoord + h)] = CRGB(red, green, blue);


      
    }
  }

  
  FastLED.show();
}

// Button readout
void readButtons() {
  for (int i = 0; i < 4; i++) {
    buttons[i] = !digitalRead(i + 3);
  }
}

int buttonPressedContinously(int buttonReadInterval) {
  static unsigned long timeStamp;
  
  if (sysTime - timeStamp >= buttonReadInterval) {
    timeStamp = sysTime;
    for (int i = 0; i < 4; i++) {
      if (buttons[i]) {
        return i + 1;
      }
    }
  }
  
  return 0;
}

// Set button history + return button index if pressed
int buttonPressed() {
  for (int i = 0; i < 4; i++) {
    if (buttons[i] != buttonsHistory[i]) {
      buttonsHistory[i] = buttons[i];
      if (buttons[i]) {
        return i + 1;
      }
    }
  }
  return 0;
}

// Serial printing button overview
void printButtons() {
  for (int i = 0; i < 4; i++) {
    Serial.print(buttons[i]);
    if (i != 3) {
      Serial.print(" | ");
    } else {
      Serial.print("\n");
    }
  }
}

// Convert X and Y coordinates to simple matrix index
uint16_t xy(uint8_t x, uint8_t y) {
  int i = x + (y * kMatrixWidth);
  return i;
}

// Fill whole matrix with color
void fillMatrix(CRGB color) {
  for (int i = 0; i < kMatrixWidth * kMatrixHeight; i++) {
    leds[i] = color;
  }
  FastLED.show();

  
}