Line data Source code
1 : #include <shared.hpp> 2 : 3 : using namespace shared; 4 72 : Card::Card(CardsEnum type, unsigned difficulty, unsigned numberOfBox) 5 : { 6 72 : this->type = type; 7 72 : this->level = 1; 8 72 : this->dificulty = difficulty; 9 72 : this->numberOfBox = numberOfBox; 10 72 : } 11 : 12 333 : CardsEnum Card::getType() 13 : { 14 333 : return this->type; 15 : } 16 : 17 28 : unsigned Card::getLevel() 18 : { 19 28 : return this->level; 20 : } 21 : 22 6 : void Card::addLevel() 23 : { 24 6 : this->level += 1; 25 6 : } 26 : 27 16 : unsigned Card::getNumberOfBox() 28 : { 29 16 : return this->numberOfBox; 30 : } 31 : 32 8 : void Card::addBox(unsigned numberOfBoxToAdd) 33 : { 34 8 : this->numberOfBox += numberOfBoxToAdd; 35 8 : } 36 : 37 8 : void Card::deleteBox(unsigned numberOfBoxToDelete) 38 : { 39 8 : this->numberOfBox -= numberOfBoxToDelete; 40 8 : } 41 : 42 82 : unsigned Card::getDificulty() 43 : { 44 82 : return this->dificulty; 45 : } 46 : 47 28 : void Card::setDificulty(unsigned newDificulty) 48 : { 49 28 : this->dificulty = newDificulty; 50 28 : }