Created
November 26, 2013 16:28
-
-
Save stekycz/7661421 to your computer and use it in GitHub Desktop.
Trolling random number generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class TrollRandomNumberGenerator | |
{ | |
/** | |
* @var int | |
*/ | |
private $seed; | |
public function __construct($seed = 42) | |
{ | |
$this->seed = $seed; | |
} | |
/** | |
* Returns next random number. | |
* | |
* @return int | |
*/ | |
public function nextRandomNumber() | |
{ | |
return $this->seed; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment