-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88505bd
commit 930f010
Showing
8 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef ALIENDRONE_H | ||
#define ALIENDRONE_H | ||
|
||
#include "Unit.h" | ||
class AlienDrone :public Unit | ||
{ | ||
|
||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef ALIENMONSTER_H | ||
#define ALIENMONSTER_H | ||
|
||
#include "Unit.h" | ||
class AlienMonster :public Unit | ||
{ | ||
|
||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef ALIENSOLIDER_H | ||
#define ALIENSOLIDER_H | ||
|
||
#include "Unit.h" | ||
class AlienSolider :public Unit | ||
{ | ||
|
||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef EARTHGUNNERY_H | ||
#define EARTHGUNNERY_H | ||
|
||
#include "Unit.h" | ||
class EearthGunnery :public Unit | ||
{ | ||
|
||
}; | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef EARTHSOLIDER_H | ||
#define EARTHSOLIDER_H | ||
|
||
#include "Unit.h" | ||
class EearthSolider :public Unit | ||
{ | ||
|
||
}; | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef EARTHTANK_H | ||
#define EARTHTANK_H | ||
|
||
#include "Unit.h" | ||
class EearthTank :public Unit | ||
{ | ||
|
||
}; | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |