Line data Source code
1 : #include <shared.hpp> 2 : 3 : using namespace shared; 4 : 5 12 : City::City() 6 : { 7 12 : this->isMature = false; 8 12 : this->isCapital = false; 9 12 : this->isStateCity = false; 10 12 : this->position = {0, 0}; 11 12 : this->stateCityType = CityStateEnum::bruxelles; 12 12 : } 13 : 14 15 : City::City(std::array<unsigned, 2> position,std::string player) 15 : { 16 15 : this->position = position; 17 15 : this->isMature = false; 18 15 : this->isCapital = false; 19 15 : this->isStateCity = false; 20 15 : this->player = player; 21 15 : } 22 : 23 6 : std::array<unsigned, 2> City::getPosition() 24 : { 25 6 : return this->position; 26 : } 27 : 28 1 : ElementEnum City::getType() 29 : { 30 1 : return ElementEnum::city; 31 : } 32 : 33 11 : void City::setStateCity(CityStateEnum name) 34 : { 35 11 : isStateCity = true; 36 11 : stateCityType = name; 37 11 : } 38 : 39 0 : std::string City::getPlayerName() 40 : { 41 0 : return this->player; 42 : }