d20 static method

int d20()

Roll a twenty-sided dice. Returns an integer in 1-20 (inclusive).

Implementation

static int d20() => random.nextInt(20) + 1;