From af3e76c5ee367ceffb78fa4a8ffc0eadf90e5de3 Mon Sep 17 00:00:00 2001 From: mafaldo Date: Sat, 17 Feb 2018 00:29:32 +0100 Subject: add Item type, use for MeleeWeapon --- src/main/cpp/Bullet.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/main/cpp/Bullet.cpp (limited to 'src/main/cpp/Bullet.cpp') 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; + } +} -- cgit v1.2.1