Skip to content

Commit

Permalink
#11 and #13 implemented most of conquer need to be fully tested
Browse files Browse the repository at this point in the history
  • Loading branch information
maeghtesadi committed Mar 11, 2018
1 parent 6964d84 commit 6c98cec
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
8 changes: 5 additions & 3 deletions smallWorld/smallWorld/Race.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class Race

int getValue();

//int getNum_tokens();
int getNum_tokens();

//void setNum_tokens();
void setNum_tokens(int Num_tokens);

bool getIsActive();

Expand All @@ -47,7 +47,9 @@ class Race

void setOwnerId(int id);

//int getMax_num_tokens();
int getMax_num_tokens();

void setMax_num_tokens(int Max_num_tokens);

string getName();

Expand Down
3 changes: 3 additions & 0 deletions smallWorld/smallWorld/mapLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,13 @@ void MapLoader::setMap(string file)
// Region type and Lost Trible
string type;
int ownerID;
int token = 0;
if (array[3].find("LT") != std::string::npos) //has lost tribes
{
type = array[3].substr(0, array[3].size()-2);
ownerID = -2;
token = 1;

}
else //doesn't have lost tribes
{
Expand Down
20 changes: 20 additions & 0 deletions smallWorld/smallWorld/race.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,43 @@
void Race::setIsActive(bool active) {
this->isActive = active;
}

bool Race::getIsActive() {
return this->isActive;
}

void Race::setIsDecline(bool decline) {
this->isDecline = decline;
}

bool Race::getIsDecline(){
return this->isDecline;
}

void Race::setOwnerId(int id ) {
this->owner_id= id;
}

int Race::getOwner_id() {
return this->owner_id;
}

void Race::setNum_tokens(int num_tokens) {
this->num_tokens = num_tokens;
}

int Race::getNum_tokens() {
return this->num_tokens;
}

void Race::setMax_num_tokens(int max_num_tokens) {
this->max_num_tokens = max_num_tokens;
}

int Race::getMax_num_tokens() {
return this->max_num_tokens;
}

int Race::getValue() {
return this->value;
}
Expand Down
Binary file modified smallWorld/smallWorld/smallWorld.cpp
Binary file not shown.

0 comments on commit 6c98cec

Please sign in to comment.