d6 static method

int d6()

Roll a six-sided dice. Returns an integer in 1-6 (inclusive).

Implementation

static int d6() => random.nextInt(6) + 1;