You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
742 B

  1. #ifndef SPELL_WARZ_ELEMENT_HPP
  2. #define SPELL_WARZ_ELEMENT_HPP 1
  3. #include <string>
  4. class Element
  5. {
  6. protected:
  7. std::string name;
  8. Element *strongAgainst;
  9. Element *weakAgainst;
  10. public:
  11. static int WEAK_COMPATIBILITY;
  12. static int NEUTRAL_COMPATIBILITY;
  13. static int STRONG_COMPATIBILITY;
  14. Element(std::string elementName,
  15. Element *elementWeakAgainst = nullptr,
  16. Element *elementStrongAgainst = nullptr);
  17. std::string getName();
  18. void setStrongAgainst(Element *element);
  19. void setWeakAgainst(Element *element);
  20. bool isStrongAgainst(Element *element);
  21. bool isWeakAgainst(Element *element);
  22. int compatibilityAgainst(Element *element);
  23. bool operator<(Element &rhs);
  24. };
  25. #endif