Пример #1
0
 /**
  * {@inheritDoc}
  */
 public function play(AbstractRulesSet $gameRules, Step $step)
 {
     if (0 === $this->numberGenerator->generate(0, 1)) {
         return new Answer('?');
     }
     return $gameRules->generateValidAnswer($step->getRawValue());
 }
Пример #2
0
 /**
  * {@inheritDoc}
  */
 public final function play(AbstractRulesSet $gameRules, Step $step)
 {
     return $gameRules->generateValidAnswer($step->getRawValue());
 }
Пример #3
0
 /**
  * {@inheritDoc}
  */
 public function play(AbstractRulesSet $gameRules, Step $step)
 {
     $validAnswer = $gameRules->generateValidAnswer($step->getRawValue());
     // Obfuscate the answer so that it's never correct
     return new Answer(md5($validAnswer->getRawValue()));
 }