-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.hpp
More file actions
84 lines (74 loc) · 1.94 KB
/
Player.hpp
File metadata and controls
84 lines (74 loc) · 1.94 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/******************************************************************************
**Program Name: Character.hpp
**Author: Long Mach
**Date: 10/29/19
** Description: This is the source file for Character Class. Character has
some member data: attack, defense, armor, and strength points, attack and defense dice.
*getters, virtual destructor and pure attack, defense function.
******************************************************************************/
#ifndef PLAYER_hpp
#define PLAYER_hpp
#include <string>
#include <random>
#include <iostream>
#include <algorithm> // for copy
#include <iterator> // for ostream_iterator
#include <vector>
#include "Space.hpp"
using std::cin;
using std::cout;
using std::endl;
using std::string;
class Player
{
protected:
string ageGroup;
int age;
int happiness;
int health;
int interest;
int money;
int expenses;
int income;
int knowledge;
std::vector<int> previous;
int prevAsset;
int prevTreasure;
Space *pointer;
std::vector<string> treasure;
std::vector<string> asset;
friend class Game;
public:
Player(Space *newPointer);
//setters
void setAgeGroup(string newGroup);
void setAge(int inputAge);
void setHappy(int happy);
void setHeath(int hp);
void setMoney();
void setExpense(int exp);
void setIncome();
void setKnowledge(int know);
void setSpace(Space *newPointer);
//getters
string getAgeGroup();
int getAge();
int getHappy();
int getHealth();
int getMoney();
int getExpense();
int getIncome();
int getKnowledge();
Space *getSpace();
// move forward and backward
void setFor();
void setBack();
void intro(int stage);
void addTreasure(string newTreasure);
void addAsset(string newAsset);
void removeTreasure(int num);
void removeAsset(int num);
void printTreasure();
void printAsset();
};
#endif