PHP Class PHPWarrior\Units\Warrior

Inheritance: extends Base
Datei anzeigen Open project: yandod/php-warrior

Public Methods

Method 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 method

Class constructor.
public __construct ( )

attack_power() public method

public attack_power ( )

character() public method

Character.
public character ( ) : string
return string

earn_points() public method

Earn points.
public earn_points ( $points )
$points

max_health() public method

Set the maximum health.
public max_health ( ) : integer
return integer

name() public method

Return the character name.
public name ( ) : mixed
return mixed

perform_turn() public method

Perform the warrior his turn.
public perform_turn ( )

play_turn() public method

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

player() public method

Player.
public player ( ) : Player
return Player

shoot_power() public method

Set the shooting power.
public shoot_power ( ) : integer
return integer