1 | <?php |
||
9 | class CDice |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * Properties |
||
14 | * |
||
15 | */ |
||
16 | private $lastRoll = []; |
||
17 | |||
18 | |||
19 | |||
20 | /** |
||
21 | * Roll the dice |
||
22 | * |
||
23 | * @param int $times the number of times to roll. |
||
24 | * |
||
25 | * @return void |
||
26 | */ |
||
27 | public function roll($times) |
||
34 | |||
35 | |||
36 | |||
37 | /** |
||
38 | * Get number of rolls in last roll |
||
39 | * |
||
40 | * @return int |
||
41 | */ |
||
42 | public function getNumOfRolls() |
||
46 | |||
47 | |||
48 | |||
49 | /** |
||
50 | * Get the array that contains the last roll(s). |
||
51 | * |
||
52 | * @return void |
||
53 | */ |
||
54 | public function getResults() |
||
58 | |||
59 | |||
60 | |||
61 | /** |
||
62 | * Get the total from the last roll(s). |
||
63 | * |
||
64 | * @return void |
||
65 | */ |
||
66 | public function getTotal() |
||
70 | } |
||
71 |