PHP Class PHPWarrior\Units\Warrior

Inheritance: extends Base
Afficher le fichier Open project: yandod/php-warrior

Méthodes publiques

Méthode Description
__construct ( ) Class constructor.
attack_power ( )
character ( ) : string Character.
earn_points ( $points ) Earn points.
max_health ( ) : integer Set the maximum health.
name ( ) : mixed Return the character name.
perform_turn ( ) Perform the warrior his turn.
play_turn ( $turn ) Play the turn.
player ( ) : Player Player.
shoot_power ( ) : integer Set the shooting power.

Method Details

__construct() public méthode

Class constructor.
public __construct ( )

attack_power() public méthode

public attack_power ( )

character() public méthode

Character.
public character ( ) : string
Résultat string

earn_points() public méthode

Earn points.
public earn_points ( $points )
$points

max_health() public méthode

Set the maximum health.
public max_health ( ) : integer
Résultat integer

name() public méthode

Return the character name.
public name ( ) : mixed
Résultat mixed

perform_turn() public méthode

Perform the warrior his turn.
public perform_turn ( )

play_turn() public méthode

Play the turn.
public play_turn ( $turn )
$turn

player() public méthode

Player.
public player ( ) : Player
Résultat Player

shoot_power() public méthode

Set the shooting power.
public shoot_power ( ) : integer
Résultat integer