-
Notifications
You must be signed in to change notification settings - Fork 0
/
Statistics.h
66 lines (49 loc) · 1.29 KB
/
Statistics.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
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
64
65
66
//
// Created by lemurpwned on 14/10/17.
//
#ifndef CTHULU_GAME_STATISTICS_H
#define CTHULU_GAME_STATISTICS_H
#include <iostream>
#include <vector>
class Statistics {
private:
static int locations_visited;
static int characters;
static int damage_dealt;
static int damaged_received;
static int items_received;
static int events;
static int items;
static int enemies_defeated;
static int statistics_count;
Statistics() = default;
public:
static Statistics* initializeStatistics();
static void addLocations_visited() {
Statistics::locations_visited++;
}
static void addCharacters() {
Statistics::characters++;
}
static void addEvents(){
Statistics::events ++;
}
static void addDamage_dealt(int dmg) {
Statistics::damage_dealt += dmg;
}
static void addDamaged_received(int dmg) {
Statistics::damaged_received += dmg;
}
static void addItems_received() {
Statistics::items_received++;
}
static void addItems(){
items++;
}
static void addEnemies_defeated(){
enemies_defeated++;
}
int operator [](const std::string &kind);
friend std::ostream &operator<< (std::ostream &output, Statistics &stat);
};
#endif //CTHULU_GAME_STATISTICS_H