diff --git a/Alien-Invasion.vcxproj b/Alien-Invasion.vcxproj index 67e189b..07b23f0 100644 --- a/Alien-Invasion.vcxproj +++ b/Alien-Invasion.vcxproj @@ -30,6 +30,13 @@ + + + + + + + 17.0 diff --git a/UnitClasses/AlienDrone.h b/UnitClasses/AlienDrone.h new file mode 100644 index 0000000..66f7d38 --- /dev/null +++ b/UnitClasses/AlienDrone.h @@ -0,0 +1,9 @@ +#ifndef ALIENDRONE_H +#define ALIENDRONE_H + +#include "Unit.h" +class AlienDrone :public Unit +{ + +}; +#endif diff --git a/UnitClasses/AlienMonster.h b/UnitClasses/AlienMonster.h new file mode 100644 index 0000000..95c12a7 --- /dev/null +++ b/UnitClasses/AlienMonster.h @@ -0,0 +1,9 @@ +#ifndef ALIENMONSTER_H +#define ALIENMONSTER_H + +#include "Unit.h" +class AlienMonster :public Unit +{ + +}; +#endif diff --git a/UnitClasses/AlienSolider.h b/UnitClasses/AlienSolider.h new file mode 100644 index 0000000..1567bb7 --- /dev/null +++ b/UnitClasses/AlienSolider.h @@ -0,0 +1,9 @@ +#ifndef ALIENSOLIDER_H +#define ALIENSOLIDER_H + +#include "Unit.h" +class AlienSolider :public Unit +{ + +}; +#endif diff --git a/UnitClasses/EarthGunnery.h b/UnitClasses/EarthGunnery.h new file mode 100644 index 0000000..d0dada2 --- /dev/null +++ b/UnitClasses/EarthGunnery.h @@ -0,0 +1,10 @@ +#ifndef EARTHGUNNERY_H +#define EARTHGUNNERY_H + +#include "Unit.h" +class EearthGunnery :public Unit +{ + +}; +#endif + diff --git a/UnitClasses/EarthSolider.h b/UnitClasses/EarthSolider.h new file mode 100644 index 0000000..55b23ca --- /dev/null +++ b/UnitClasses/EarthSolider.h @@ -0,0 +1,10 @@ +#ifndef EARTHSOLIDER_H +#define EARTHSOLIDER_H + +#include "Unit.h" +class EearthSolider :public Unit +{ + +}; +#endif + diff --git a/UnitClasses/EarthTank.h b/UnitClasses/EarthTank.h new file mode 100644 index 0000000..5e1bcb5 --- /dev/null +++ b/UnitClasses/EarthTank.h @@ -0,0 +1,10 @@ +#ifndef EARTHTANK_H +#define EARTHTANK_H + +#include "Unit.h" +class EearthTank :public Unit +{ + +}; +#endif + diff --git a/UnitClasses/Unit.h b/UnitClasses/Unit.h new file mode 100644 index 0000000..5870a3d --- /dev/null +++ b/UnitClasses/Unit.h @@ -0,0 +1,28 @@ +#ifndef UNIT_H +#define UNIT_H + +enum UnitType +{ + ES, EG, ET, + AS, AD, AM +}; +class Unit +{ + UnitType unitType; + int id; + int joinTime; + int health; + int power; + int attackCapacity; +public: + void recieveDamage(int loss); + virtual void print() = 0; + virtual void attack(Unit* aUnit) = 0; //shouldn't it be passed a list??? will check later + +}; +#endif + +void Unit:: recieveDamage(int loss) +{ + health -= loss; +}