Files
cppcourse/397/SolutionEx41Bonus/Beeper.cpp
T
2026-10-05 11:27:21 +02:00

12 lines
267 B
C++

#include "Beeper.h"
#include "Pelican.h"
#include <iostream>
Beeper::Beeper(Pelican &pel) : myPelican(pel) { myPelican.attach(*this); }
void Beeper::update() {
if (myPelican.getState() == Pelican::RED_STATE) {
std::cout << "BEEP!\n";
}
}