lolautoaccept/src/runepage.cpp
2022-07-10 15:19:25 +02:00

19 lines
676 B
C++

#include "runepage.h"
#include <algorithm>
bool RunePage::operator==(const RunePage& rp) const {
if(primaryStyle == rp.primaryStyle && secondaryStyle == rp.secondaryStyle && selectedAspects.size() == rp.selectedAspects.size()) {
return std::is_permutation(selectedAspects.begin(), selectedAspects.end(), rp.selectedAspects.begin());
}
return false;
}
RunePage::operator bool() const {
return primaryStyle != 0 && secondaryStyle != 0 && selectedAspects.size() == 9;
}
std::ostream& operator<<(std::ostream& str, const RunePage& rp) {
return str << "Primary: " << rp.primaryStyle << " Secondary: " << rp.secondaryStyle << " aspects: " << rp.selectedAspects.size();
}