\Rasb14\T100Dice

Dice, a class representing a real world dice.

Summary

Methods
Properties
Constants
getHistogramSequence()
getHistogramMin()
getHistogramMax()
__construct()
roll()
value()
No public properties found
No constants found
No protected methods found
$value
N/A
No private methods found
$sequence
$sides
N/A

Properties

$value

$value : integer

Type

integer — The current value of the die.

$sequence

$sequence : array

Type

array — The numbers stored in sequence.

$sides

$sides : 

Type

Methods

getHistogramSequence()

getHistogramSequence() : array

Get the sequence.

Returns

array —

as the sequence.

getHistogramMin()

getHistogramMin() : integer

Gets the minimum value for the histogram.

Returns

integer —

as the minimum value.

getHistogramMax()

getHistogramMax() : integer

Gets the maximum value for the histogram.

Returns

integer —

as the maximum value.

__construct()

__construct(integer  $sides = 6) 

Constructor to create a Dice.

Parameters

integer $sides

The number of sides of the die.

roll()

roll() : integer

Rolls the die.

Returns

integer —

as the current value of the die.

value()

value() : integer

Gets the current value of the upfacing side of the die.

Returns

integer —

as the current value of the die.