Example #1
0
 /**
  * Perform an attack to the opponent
  * @param Bridge\AbstractFighter $opponent
  * @return string
  */
 public function attack(Bridge\AbstractFighter $opponent)
 {
     return sprintf("Attacking %s with a gun!", $opponent->getName());
 }
Example #2
0
 /**
  * @param string $name
  * @param Bridge\WeaponInterface $weapon
  */
 public function __construct($name, Bridge\WeaponInterface $weapon)
 {
     parent::__construct($name, $weapon);
     $this->force = 150.0;
     $this->life = 200.0;
 }
Example #3
0
 public function testGodMove()
 {
     $this->assertSame('Moving by teleportation...', $this->god->move());
 }