-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIdea.hpp
More file actions
63 lines (49 loc) 路 1.2 KB
/
Copy pathIdea.hpp
File metadata and controls
63 lines (49 loc) 路 1.2 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
#pragma once
#ifndef WORLDSIM_IDEA_HPP
#define WORLDSIM_IDEA_HPP
/* WorldSim: Idea.hpp
#include "Idea.hpp"
An Idea is a precursor to Technology. A Character will have an idea about how to improve something. Once it spreads
to the leader or a book is written about it, it will become established as a technology. The originator of the idea
will be the one credited.
Ideas will later cover more than technology.
*/
class Character;
class Idea
{
public:
static int lastID; // Static variable to keep track of the last assigned ID
int id;
Character* originator;
bool isSpecialIdea;
enum IDEA_TYPE
{
IDEA_NONE, // error flag
IDEA_MINING,
IDEA_SMELTING,
IDEA_MANUFACTURING,
IDEA_ASTRONOMY,
IDEA_MILITARY,
IDEA_AGRICULTURE,
ENUM_COUNT
};
IDEA_TYPE type;
Idea(Character* _originator, IDEA_TYPE _type);
Idea(const Idea& other);
Idea& operator=(const Idea& other);
bool operator==(const Idea& other) const;
std::string ideaToString(IDEA_TYPE idea);
};
class SpecialIdea: public Idea
{
public:
enum TYPE
{
ADAMANTINE,
ENUM_COUNT
};
std::string biographyText;
SpecialIdea(Character* originator, IDEA_TYPE type);
std::string discoveryText();
};
#endif // WORLDSIM_IDEA_HPP