#include "Light.h" #include "Pelican.h" #include "Screen.h" #include Light::Light(std::string name, int x, int y, int color) : x(x), y(y), c(color), name(name) {} Light::~Light() { std::cout << "Deleting light (" << name << ", " << x << ", " << y << ", " << c << ")" << "\n"; } void Light::set(LightState newState) { state = newState; Screen::write(name.c_str(), x, y, state == FLASH ? (128 + c) : (state == OFF ? 0 : c)); // 128 + color was used to make a character flash (but not any more) } Light::LightState Light::get(void) { return state; }