#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include <vector>
#define TFT_DC 27
#define TFT_CS 12
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
#define SpielfeldX 200
#define SpielfeldY 200
// Deklaration eines Vektors, der Punkte enthält, um die Segmente der Schlange zu speichern
std::vector<int> snake;
snake.push_back(10);
Structure
int x;
int y;
void setup() {
tft.begin();
tft.drawRect(20,60, SpielfeldX, SpielfeldY, ILI9341_WHITE);
tft.setCursor(1, 3);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(1);
tft.println("Druecke eine beliebige Taste um das Spiel zu starten");
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}