Ejemplo n.º 1
0
 /**
  * @param \PHPWeekly\Entity\Prisoner $prisoner
  *
  * @return bool
  */
 public function writeFile(Prisoner $prisoner)
 {
     $txt = $this->readFile();
     $txt .= strtolower($prisoner->getPreviousResponse()) . PHP_EOL;
     file_put_contents($this->fileName, $txt);
     return;
 }
Ejemplo n.º 2
0
 /**
  * @param Prisoner $me
  * @param Prisoner $otherGuy
  */
 public function __construct(Prisoner $me, Prisoner $otherGuy)
 {
     $this->myLastAnswer = strtolower($me->getPreviousResponse());
     $this->otherGuyLastAnswer = strtolower($otherGuy->getPreviousResponse());
 }