|
@ -7,11 +7,17 @@ typedef struct { |
|
|
int health; |
|
|
int health; |
|
|
int damage; |
|
|
int damage; |
|
|
int armor; |
|
|
int armor; |
|
|
|
|
|
int attack; |
|
|
} enemy; |
|
|
} enemy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool playerAlive(int health); |
|
|
bool playerAlive(int health); |
|
|
int playerHealth(int health, int damage); |
|
|
int playerHealth(int health, int damage); |
|
|
|
|
|
int enemyDamaged(enemy enemy, int damage); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Getter/Setter Funktionen |
|
|
|
|
|
|
|
|
//setEnemyHealth(&enemy.health, health); |
|
|
//setEnemyHealth(&enemy.health, health); |
|
|
void *setEnemyHealth(int *num, int health); |
|
|
void *setEnemyHealth(int *num, int health); |
|
@ -22,8 +28,7 @@ int getEnemyDamage(enemy enemy); |
|
|
//setEnemyArmor(&enemy.armor, armor); |
|
|
//setEnemyArmor(&enemy.armor, armor); |
|
|
void *setEnemyArmor(int *num, int damage); |
|
|
void *setEnemyArmor(int *num, int damage); |
|
|
int getEnemyArmor(enemy enemy); |
|
|
int getEnemyArmor(enemy enemy); |
|
|
|
|
|
|
|
|
int enemyDamaged(enemy enemy, int damage); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Function to get the value of Data in a struct, needs a pointer to the struct |
|
|
|
|
|
int getEnemyInt(int *structParam); |
|
|
|
|
|
|
|
|
#endif |
|
|
#endif |