player module¶
- class unit.player.Player(allegiance)¶
Bases:
object
player class
- Parameters
allegiance (int) -- Variable décrivant a quel camp le joueur appartient 1 : allié, -1: ennemie
- cost(valeur)¶
reduce the player money
- Parameters
valeur (int) -- value which is going to be substracted to the player money
- gain(valeur)¶
augment the player resources
- Parameters
valeur (int) -- value which is going to be added to the player money
- getAllegiance()¶
getter for the player side
- Returns
-1 for an ally, -1 for an ennemy
- Return type
int
- getHealth()¶
getter for player health
- Returns
Affiche la santé du joueur
- Return type
int
- getMoney()¶
getter for the player money
- Returns
the player money (for displaying it later)
- Return type
int
- hurt(atk)¶
called when the player takes damages
- Parameters
atk (int) -- value which is going to be substracted to the player health