27 lines
795 B
C++
27 lines
795 B
C++
#ifndef CREATURELIB_CREATUREINDEX_HPP
|
|
#define CREATURELIB_CREATUREINDEX_HPP
|
|
#include "../../Defines.hpp"
|
|
|
|
namespace CreatureLib::Battling {
|
|
class CreatureIndex {
|
|
u8 _side;
|
|
u8 _creature;
|
|
|
|
public:
|
|
CreatureIndex() noexcept : _side(0), _creature(0) {}
|
|
CreatureIndex(u8 side, u8 creature) noexcept : _side(side), _creature(creature) {}
|
|
|
|
u8 GetSideIndex() const noexcept { return _side; }
|
|
|
|
u8 GetCreatureIndex() const noexcept { return _creature; }
|
|
|
|
bool operator==(const CreatureIndex& rhs) const noexcept {
|
|
return (_side == rhs._side) && (_creature == rhs._creature);
|
|
}
|
|
|
|
bool operator!=(const CreatureIndex& rhs) const noexcept { return !operator==(rhs); }
|
|
};
|
|
}
|
|
|
|
#endif // CREATURELIB_CREATUREINDEX_HPP
|