my
$diceobj
;
BEGIN { plan
tests
=> 26 };
INIT {
$diceobj
= Games::Dice::Probability->new(
"(2d6+2)+(1d4)-(3d3+1)"
);
}
ok(
$diceobj
->isa(
"Games::Dice::Probability"
),1);
ok(
$diceobj
->min(),-5);
ok(
$diceobj
->max(),14);
ok(
$diceobj
->bounds()->[0],-5);
ok(
$diceobj
->bounds()->[1],14);
ok(
$diceobj
->probability(-5),0.000257201646090535);
ok(
$diceobj
->probability(-4),0.00154320987654321);
ok(
$diceobj
->probability(-3),0.00540123456790123);
ok(
$diceobj
->probability(-2),0.0136316872427984);
ok(
$diceobj
->probability(-1),0.0275205761316872);
ok(
$diceobj
->probability(0),0.0470679012345679);
ok(
$diceobj
->probability(1),0.0704732510288066);
ok(
$diceobj
->probability(2),0.0943930041152263);
ok(
$diceobj
->probability(3),0.114197530864198);
ok(
$diceobj
->probability(4),0.125514403292181);
ok(
$diceobj
->probability(5),0.125514403292181);
ok(
$diceobj
->probability(6),0.114197530864198);
ok(
$diceobj
->probability(7),0.0943930041152263);
ok(
$diceobj
->probability(8),0.0704732510288066);
ok(
$diceobj
->probability(9),0.0470679012345679);
ok(
$diceobj
->probability(10),0.0275205761316872);
ok(
$diceobj
->probability(11),0.0136316872427984);
ok(
$diceobj
->probability(12),0.00540123456790123);
ok(
$diceobj
->probability(13),0.00154320987654321);
ok(
$diceobj
->probability(14),0.000257201646090535);
ok(1);