aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/cpp/Bullet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/cpp/Bullet.cpp')
-rw-r--r--src/main/cpp/Bullet.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/cpp/Bullet.cpp b/src/main/cpp/Bullet.cpp
new file mode 100644
index 0000000..c856213
--- /dev/null
+++ b/src/main/cpp/Bullet.cpp
@@ -0,0 +1,11 @@
+#include "Bullet.hpp"
+
+bool Bullet::decreaseAmount(int qnt)
+{
+ if (_amount >= qnt) {
+ _amount = _amount - qnt;
+ return true;
+ } else {
+ return false;
+ }
+}