From 663ad60ee3a2d6aaed9aebf116a3720060015a57 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Mon, 4 Jul 2022 11:13:11 +0200 Subject: [PATCH] util player methods --- include/game/Player.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/game/Player.h b/include/game/Player.h index 54715d8..13f7da9 100644 --- a/include/game/Player.h +++ b/include/game/Player.h @@ -42,6 +42,9 @@ public: const PlayerUpgrades& getUpgrades() const { return m_Upgrades; } PlayerUpgrades& getUpgrades() { return m_Upgrades; } + bool HasEnoughGold(std::uint32_t gold) const { return m_Gold >= gold; } + bool HasEnoughExp(std::uint32_t exp) const { return m_Exp >= exp; } + PlayerID GetID() const { return m_ID; } };