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

29 lines
566 B
C++

#include "Keyboard.h"
#include "Pelican.h"
#include "Pole.h"
#include "TimerSet.h"
#include <cctype> // provides toupper()
int main() {
Keyboard kbd;
Pelican thePelican;
Pole pole1(20, 0, thePelican);
Pole pole2(40, 0, thePelican);
char c = 0;
while (std::toupper(c) != 'Q') { // loop until 'Q' is pressed
c = kbd.getChar(); // get the character
if (c == ' ') {
// it's a space, so press the WAIT button
thePelican.press();
}
}
return 0;
}