#include "soldier.hh" #include Soldier::Soldier(int hp, int dmg, std::string scream) : health_points_{ hp } , damage_{ dmg } , scream_{ scream } {} void Soldier::print_state() const { std::cout << "I have " << health_points_ << " health points.\n"; } void Soldier::scream() const { std::cout << scream_ << "\n"; } void Soldier::attack(Soldier& s) { s.health_points_ -= this->damage_; }