Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

33 рядки
500 B

4 роки тому
  1. #include <cstring>
  2. #include "Spell.hpp"
  3. Spell::Spell(const char *spellName,
  4. const int spellType,
  5. int spellPower,
  6. int spellCost) : type(spellType), name("")
  7. {
  8. this->power = spellPower;
  9. this->cost = spellCost;
  10. strcpy(this->name, spellName);
  11. }
  12. int Spell::getType()
  13. {
  14. return this->type;
  15. }
  16. int Spell::getPower()
  17. {
  18. return this->power;
  19. }
  20. int Spell::getCost()
  21. {
  22. return this->cost;
  23. }
  24. const char *Spell::getName()
  25. {
  26. return this->name;
  27. }