Dice
in package
FinalYes
Dice rolling helper.
Included for historical compatibility only. The Game API is out of support and should not be used in new code.
Tags
Table of Contents
Properties
- $diceCount : mixed
- $sidesCount : mixed
Methods
- __construct() : mixed
- enclose() : mixed
- getAverage() : mixed
- getMax() : mixed
- getMin() : mixed
- roll() : int
- rollEqual() : bool
- rollHigher() : bool
- rollImpossible() : bool
- rollLower() : bool
- rand() : int
Properties
$diceCount
protected
mixed
$diceCount
$sidesCount
protected
mixed
$sidesCount
Methods
__construct()
public
__construct(mixed $sidesCount[, mixed $diceCount = 1 ]) : mixed
Parameters
- $sidesCount : mixed
- $diceCount : mixed = 1
enclose()
public
enclose(mixed $value) : mixed
Parameters
- $value : mixed
getAverage()
public
getAverage() : mixed
getMax()
public
getMax() : mixed
getMin()
public
getMin() : mixed
roll()
public
roll() : int
Return values
introllEqual()
public
rollEqual(mixed $value) : bool
Parameters
- $value : mixed
Return values
boolrollHigher()
public
rollHigher(mixed $value) : bool
Parameters
- $value : mixed
Return values
boolrollImpossible()
public
rollImpossible() : bool
Return values
boolrollLower()
public
rollLower(mixed $value) : bool
Parameters
- $value : mixed
Return values
boolrand()
protected
rand(mixed $min, mixed $max) : int
Parameters
- $min : mixed
- $max : mixed