#include "tally.h" #include "subtype_tally.h" TallyType Tally::intToType(int value) { if (value < static_cast(TallyType::None) || value > static_cast(TallyType::MaxValue)) { return TallyType::None; } return static_cast(value); } QList Tally::compute(const QList &cards, const TallyType type) { switch (type) { case TallyType::None: return {}; case TallyType::Subtypes: return SubtypeTally::countSubtypes(cards); } return {}; }