percent method

bool percent(
  1. int chance
)

Returns true chance percent of the time

Implementation

bool percent(int chance) => nextInt(100) < chance;