refactor: changed to PlayerID type

This commit is contained in:
2022-02-16 16:31:18 +01:00
parent 840d5edbe4
commit 790237a1b5

View File

@@ -15,9 +15,10 @@ private:
std::uint32_t m_Gold;
std::uint32_t m_Exp;
std::string m_Name;
std::uint8_t m_ID;
PlayerID m_ID;
std::uint8_t m_GoldPerSecond;
public:
Player(std::uint8_t id = 0) : m_TeamColor(game::TeamColor::None), m_Gold(0), m_Exp(0), m_ID(id), m_GoldPerSecond(5) {}
@@ -40,7 +41,7 @@ public:
void addExp(std::uint32_t exp) { m_Exp += exp; }
void removeExp(std::uint32_t exp) { m_Exp -= exp; }
std::uint8_t getID() const { return m_ID; }
PlayerID getID() const { return m_ID; }
};
} // namespace game