#include "p.h" #include "Glock.h" #include "DesertEagle.h" #include "Pistol.h" void Player::buyPistol(const PistolType pistolType, const int damagePerRound, const int clipSize, const int remainingAmmo) { if (PistolType::GLOCK == pistolType) { _pistol = new Glock(damagePerRound, clipSize, remainingAmmo + 1); } else // PistolType::DESERT_EAGLE { _pistol = new DesertEagle(damagePerRound, clipSize, remainingAmmo + 1); } }