16#ifndef MIRAI_DICE_MESSAGE_HPP_
17#define MIRAI_DICE_MESSAGE_HPP_
40 bool isValid_() const final {
return this->value_ > 0 && this->value_ <= 6; }
49 if (value > 0 && value <= 6) this->value_ = value;
64 if (value > 0 && value <= 6) this->value_ = value;
bool operator==(const DiceMessage &rhs)
bool isValid_() const final
int GetValue() const
获取骰子点数
DiceMessage & SetValue(int value)
设置骰子点数,不在1~6之间的值将不会被设置
static constexpr MessageTypes TYPE_
static constexpr bool SUPPORT_SEND_
bool operator!=(const DiceMessage &rhs)