-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIsle.h
More file actions
49 lines (41 loc) · 1.17 KB
/
Copy pathIsle.h
File metadata and controls
49 lines (41 loc) · 1.17 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
#ifndef PLACE_H
#define PLACE_H
#include <string>
#include <vector>
#include <fstream>
#include <sstream>
#include <iostream>
// Items their collectable energy points
enum Item
{
EMPTY = 0,
GOLDIUM = 250,
EINSTEINIUM = 2000,
AMAZONITE = 500000
};
class Isle
{
private:
const std::string name; // Name of the Isle
const int capacity = 10; // If more realm shapers than this capacity gathers at this isle, it self-destructs and must be deleted from the map
int shaperCount = 0; // Number of realm shapers that exist in the Isle at the same time
Item item = EMPTY; // Possible item Isle holds
public:
// Constructor decleration
Isle(std::string name);
// Getters-Setters
const std::string &getName() const;
Item getItem();
void setItem(Item item);
int getShaperCount();
bool increaseShaperCount();
bool decreaseShaperCount();
// Overloaded operators
bool operator==(const Isle &other) const;
bool operator<(const Isle &other) const;
bool operator>(const Isle &other) const;
friend std::ostream &operator<<(std::ostream &os, const Isle &p);
// Isle parser
static std::vector<Isle *> readFromFile(const std::string &filename);
};
#endif