#include <Arduino.h>
#include "Game.h"
#include "Stack.h"
// === Global objects ===
Sound sound;
Stack game(&sound);
Strip strip(&game);
Controller controller(&game, 2, Signal::BA, 3, Signal::BB, 4, Signal::BC);
void setup() {
Serial.begin(115200);
Serial.println("Stack Game Started");
Serial.println("Buttons:");
Serial.println(" A (pin 2) - Shoot Red");
Serial.println(" B (pin 3) - Shoot Green");
Serial.println(" C (pin 4) - Shoot Blue");
Serial.println("Match the colors to eliminate the snake!");
strip.begin();
game.startLevel(0);
}
void loop() {
// Update game logic
game.loop();
// Read buttons and trigger callbacks
controller.loop();
// Update LED strip
strip.update();
// Small delay for stability
delay(10);
}