chore: Add course material
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
// ======================================================
|
||||
//
|
||||
// Represents a light, implemented as a string written
|
||||
// to a console window
|
||||
//
|
||||
// ======================================================
|
||||
|
||||
#ifndef LIGHT_H
|
||||
#define LIGHT_H
|
||||
|
||||
#include <string>
|
||||
|
||||
class Light {
|
||||
public:
|
||||
Light(std::string name, int x, int y, int color);
|
||||
~Light();
|
||||
|
||||
enum LightState { ON, OFF, FLASH };
|
||||
|
||||
void set(LightState new_state);
|
||||
LightState get(void);
|
||||
|
||||
private:
|
||||
int c; // light colour
|
||||
int x, y;
|
||||
std::string name;
|
||||
LightState state;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user