/** * {@inheritDoc} */ public function play(AbstractRulesSet $gameRules, Step $step) { if (0 === $this->numberGenerator->generate(0, 1)) { return new Answer('?'); } return $gameRules->generateValidAnswer($step->getRawValue()); }
/** * {@inheritDoc} */ public final function play(AbstractRulesSet $gameRules, Step $step) { return $gameRules->generateValidAnswer($step->getRawValue()); }
/** * {@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())); }