-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRace.hpp
40 lines (28 loc) · 770 Bytes
/
Race.hpp
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
// Copyright 2016 Anton Erholt <aerholt@kth.se>
#ifndef LAB3_RACE_HPP_
#define LAB3_RACE_HPP_
#include <string>
#include <vector>
namespace lab3 {
struct Race {
std::string name;
std::string sound;
friend std::ostream &operator<<(std::ostream &str, const Race c);
std::string noise() const {
return this->sound;
}
};
std::ostream &operator<<(std::ostream &str, const Race c) {
str << c.name;
return str;
}
std::vector<Race> character_races = {
Race{"Bear", "RAAWR!"},
Race{"Fox", "Grrrr..."},
Race{"Wolf", "GRROWL!"},
};
const Race RACE_RABBIT{"Rabbit", "Omnomnom."};
const Race RACE_CROCODILE{"Crocodile", "Snap-snap!"};
const Race RACE_RABBIDILE{"Rabbidile", "Omnom-snap-nom!"};
} // namespace lab3
#endif // LAB3_RACE_HPP_