Exemplo n.º 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());
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public final function play(AbstractRulesSet $gameRules, Step $step)
 {
     return $gameRules->generateValidAnswer($step->getRawValue());
 }
Exemplo n.º 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()));
 }