Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Mos\Dice;
- /**
- * A dice which has the ability to show a histogram.
- */
- class DiceHistogram extends Dice
- {
- use HistogramTrait;
- /**
- * Roll the dice, remember its value in the serie and return
- * its value.
- *
- * @return int the value of the rolled dice.
- */
- public function roll()
- {
- $this->serie[] = parent::roll();
- return $this->getLastRoll();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement