Skip to content
Permalink
93c2d6a5b0
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
13 lines (13 sloc) 355 Bytes
#include "Monster.h"
void Monster::attack(Character& target)
{
target.health -= damage;
cout << name << " attacks " << target.name << " doing " << damage << " damage!" << endl;
cout << name << " health: " << health << endl;
}
Monster::Monster(string newname, int newHealth, int newDamage)
{
name = newname;
health = newHealth;
damage = newDamage;
}