-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcell.h
36 lines (29 loc) · 819 Bytes
/
cell.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
#ifndef CELL_H
#define CELL_H
#include <cstddef>
#include "observer.h"
#include "state.h"
#include "subject.h"
#include "decorator.h"
#include "enemy.h"
class Cell : public Subject, public Observer {
size_t r, c;
State s;
AbstractPotion* potion = nullptr;
Enemy* enemy = nullptr;
// Add other private members if necessary
public:
Cell(size_t r, size_t c, State s);
Cell& operator=(const Cell& c);
Cell(const Cell& c);
void notify(Subject& whoFrom) override;
void setState(const State& newState) override;
Info getInfo() override;
AbstractPotion* getPotion() noexcept;
Enemy* getEnemy() override;
void setPotion(AbstractPotion* p);
void setEnemy(Enemy* e);
State getState() const override;
~Cell();
};
#endif