-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIOBserver.h
50 lines (44 loc) · 898 Bytes
/
IOBserver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#pragma once
class Game;
class Hero;
class IOBserver {
public:
virtual void evnt(Game & g) = 0; //ñîáûòèå
};
class ViewHealth : public IOBserver {
ostream& out;
public:
ViewHealth(ostream& _out) : out(_out) {};
void evnt(Game& g);
};
class ViewPosition : public IOBserver {
ostream& out;
public:
ViewPosition(ostream& _out) : out(_out) {};
void evnt(Game &g);
};
class ViewCoins : public IOBserver {
ostream& out;
public:
ViewCoins(ostream& _out) : out(_out) {};
void evnt(Game& g);
};
class ViewTotalSteps : public IOBserver {
ostream& out;
public:
ViewTotalSteps(ostream& _out) : out(_out) {};
void evnt(Game& g);
};
class ViewLabirint : public IOBserver {
Game& g;
ostream& out;
public:
ViewLabirint(Game & _g, ostream& _out) : g(_g), out(_out) {};
void evnt(Game& g);
};
class Controller {
Game& g;
public:
Controller(Game& _g) : g(_g) {}
void changepose(int val);
};