-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNodeRegion.cpp
More file actions
95 lines (77 loc) · 2.05 KB
/
NodeRegion.cpp
File metadata and controls
95 lines (77 loc) · 2.05 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
85
86
87
88
89
90
91
92
93
94
95
//
// Created by fok poon kai on 2018-03-09.
//
#include "NodeRegion.h"
#include "ListofPlayer.h"
#include "NodeRegion.h"
#include "ListofPlayer.h"
NodeRegion::NodeRegion() {
this->region_num=0;
this->region_population=0;
this->region_status="";
this->player_race="";
this->player_specialpower="";
this->lost_tride=false;
this->id_player = 0;
}
NodeRegion::NodeRegion(int region_num, int region_population ,string region_status
,string player_race,string player_specialpower,bool losttride, int id_player){
this->region_num=region_num;
this->region_population=region_population;
this->region_status=region_status;
this->player_race=player_race;
this->player_specialpower=player_specialpower;
this->lost_tride=losttride;
this->id_player=id_player;
};
//get
int NodeRegion::getid_player() {
return id_player;
}
int NodeRegion::getregion_num() {
return region_num;
}
int NodeRegion::getregion_population() {
return region_population;
}
string NodeRegion::getregion_status() {
return region_status;
}
string NodeRegion::getplayer_race() {
return player_race;
}
string NodeRegion::getplayer_specialpower() {
return player_specialpower;
}
bool NodeRegion::getlost_tride() {
return lost_tride;
}
//set
void NodeRegion::setregion_num(int n) {
this->region_num=n;
}
void NodeRegion::setregion_population(int n) {
this->region_population=n;
}
void NodeRegion::setregion_status(string str) {
this->region_status=str;
}
void NodeRegion::setplayer_race(string str) {
this->player_race=str;
}
void NodeRegion::setplayer_specialpower(string str) {
this->player_specialpower=str;
}
void NodeRegion::setlost_tride(bool bn) {
this->lost_tride=bn;
}
void NodeRegion::setid_player(int id_player) {
this->id_player=id_player;
}
void NodeRegion::setconquese(ListofPlayer np) {
this->id_player=np.getidPlayer();
this->region_population=np.getpopulation();
this->player_specialpower=np.getspecialPower();
this->player_race=np.getrace();
}
NodeRegion::~NodeRegion(){};