chore: Add course material
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
// ======================================================
|
||||
// Light.h
|
||||
// ======================================================
|
||||
|
||||
#ifndef LIGHT_H
|
||||
#define LIGHT_H
|
||||
|
||||
#include <string>
|
||||
|
||||
class PoleVisitor;
|
||||
|
||||
class Light {
|
||||
public:
|
||||
Light(std::string name, int x, int y, int color);
|
||||
~Light();
|
||||
|
||||
enum LightState { ON, OFF, FLASH };
|
||||
|
||||
int getColor();
|
||||
std::string getString();
|
||||
int getX();
|
||||
int getY();
|
||||
|
||||
void set(LightState newState); // now just sets the state
|
||||
LightState get(void);
|
||||
|
||||
void accept(PoleVisitor &);
|
||||
|
||||
private:
|
||||
int c; // light color
|
||||
int x, y;
|
||||
std::string name;
|
||||
LightState state;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user