* Generates a random percent chance of an event occuring, * and returns the result * @param value Value percentage (0-100%) * @return True if the chance succeeded. */
| 131 | * @return True if the chance succeeded. |
| 132 | */ |
| 133 | bool percent(int value) |
| 134 | { |
| 135 | return (generate(0, 99) < value); |
| 136 | } |
| 137 | |
| 138 | /** |
| 139 | * Generates a random positive integer up to a number. |
no test coverage detected