16enum class MoveXValue : uint8_t {
26enum class MoveYValue : uint8_t {
56 operator uint8_t()
const {
return static_cast<uint8_t
>(
_value); }
76 static constexpr MoveXValue
None = MoveXValue::None;
78 static constexpr MoveXValue
Right = MoveXValue::Right;
80 static constexpr MoveXValue
Left = MoveXValue::Left;
96 case MoveXValue::Right:
98 case MoveXValue::Left:
114 static constexpr MoveYValue
None = MoveYValue::None;
116 static constexpr MoveYValue
Up = MoveYValue::Up;
118 static constexpr MoveYValue
Down = MoveYValue::Down;
136 case MoveYValue::Down:
Base template providing common logic for movement directions.
Definition move_types.h:38
EnumType _value
Definition move_types.h:65
bool operator==(EnumType v) const
Equality comparison with underlying enum.
Definition move_types.h:59
constexpr MoveDirection(EnumType v)
Construct a new Move Direction object.
Definition move_types.h:44
bool operator!() const
Logical NOT operator.
Definition move_types.h:53
bool operator!=(EnumType v) const
Inequality comparison with underlying enum.
Definition move_types.h:62
bool is_none() const
Checks if the movement state is None (0).
Definition move_types.h:47
EnumType get_value() const
Gets the underlying enum value.
Definition move_types.h:50
Encapsulates horizontal movement states and utility methods.
Definition move_types.h:73
static constexpr MoveXValue None
Local alias for None state.
Definition move_types.h:76
static constexpr MoveXValue Right
Local alias for Right state.
Definition move_types.h:78
constexpr MoveX()
Default constructor initializing to None.
Definition move_types.h:86
static constexpr MoveXValue Left
Local alias for Left state.
Definition move_types.h:80
const char * to_string() const
Converts the state to a human-readable string.
Definition move_types.h:92
Encapsulates vertical movement states and utility methods.
Definition move_types.h:111
static constexpr MoveYValue Up
Local alias for Up state.
Definition move_types.h:116
constexpr MoveY()
Default constructor initializing to None.
Definition move_types.h:124
const char * to_string() const
Converts the state to a human-readable string.
Definition move_types.h:130
static constexpr MoveYValue None
Local alias for None state.
Definition move_types.h:114
static constexpr MoveYValue Down
Local alias for Down state.
Definition move_types.h:118