Line data Source code
1 : #include <shared.hpp> 2 : 3 : using namespace shared; 4 : 5 3 : Caravan::Caravan() 6 : { 7 3 : this->position = {0, 0}; 8 3 : this->used = false; 9 3 : } 10 : 11 2 : Caravan::Caravan(std::array<unsigned, 2> position, std::string player) 12 : { 13 2 : this->position = position; 14 2 : this->player = player; 15 2 : } 16 : 17 3 : std::array<unsigned, 2> Caravan::getPosition() 18 : { 19 3 : return this->position; 20 : } 21 : 22 2 : void Caravan::setPos(std::array<unsigned, 2> position) 23 : { 24 2 : this->position = position; 25 2 : } 26 : 27 2 : void Caravan::setUsed(bool used) 28 : { 29 2 : this->used = used; 30 2 : } 31 : 32 3 : bool Caravan::isUsed() 33 : { 34 3 : return this->used; 35 : } 36 : 37 0 : ElementEnum Caravan::getType() 38 : { 39 0 : return ElementEnum::caravan; 40 : } 41 : 42 2 : std::string Caravan::getPlayerName() 43 : { 44 2 : return this->player; 45 : }