#include "Globals.hpp"
#include "Tetris.hpp"
#include "FlappyBird.hpp"
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
// TetrisGame tetris(display, leftButton, rightButton, upButton, downButton);
FlappyBird flappy(display, upButton); // Assuming the flap button is connected to pin 2
void setup() {
Serial.begin(9600);
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
pinMode(leftButton, INPUT_PULLUP);
pinMode(rightButton, INPUT_PULLUP);
pinMode(upButton, INPUT_PULLUP);
pinMode(downButton, INPUT_PULLUP);
// tetris.setup();
flappy.setup();
}
void loop() {
// tetris.loop();
flappy.loop();
}