Line | Branch | Exec | Source |
---|---|---|---|
1 | #ifndef INCANTATION_HPP | ||
2 | #define INCANTATION_HPP | ||
3 | |||
4 | #include <vector> | ||
5 | |||
6 | enum IncantationOutcome | ||
7 | { | ||
8 | FAILURE, | ||
9 | SUCCESS, | ||
10 | IN_PROGRESS | ||
11 | }; | ||
12 | |||
13 | class Incantation | ||
14 | { | ||
15 | private: | ||
16 | std::vector<int> pos; | ||
17 | int lvl; | ||
18 | std::vector<int> playersIds; | ||
19 | IncantationOutcome status = IN_PROGRESS; | ||
20 | public: | ||
21 | 12 | Incantation(std::vector<int> pos, int lvl, std::vector<int> playersIds) : pos(pos), lvl(lvl), playersIds(playersIds) {}; | |
22 | 5 | ~Incantation() {}; | |
23 | |||
24 | 6 | void setStatus(IncantationOutcome status) { this->status = status; }; | |
25 | 2 | IncantationOutcome getStatus() { return this->status; }; | |
26 | |||
27 | 1 | void addPlayer(int playerId) { this->playersIds.push_back(playerId); }; | |
28 | 1 | std::vector<int> getPlayersId() { return this->playersIds; }; | |
29 | |||
30 | 8 | std::vector<int> getPosition() { return {this->pos}; }; | |
31 | 2 | int getLvl() { return this->lvl; }; | |
32 | }; | ||
33 | |||
34 | |||
35 | #endif // INCANTATION_HPP | ||
36 |