---
title: d20()
framework: gameplaykit
role: symbol
role_heading: Type Method
path: gameplaykit/gkrandomdistribution/d20()
---

# d20()

Creates a random distribution equivalent to a twenty-sided die.

## Declaration

```swift
class func d20() -> Self
```

## Return Value

Return Value A uniform random distribution that produces values in the range [1, 20].

## Discussion

Discussion The newly created distribution uses its own GKRandomSource instance, so the random behavior of the distribution is independent from that of other randomizers.

## See Also

### Creating Specific Random Distributions

- [d6()](gameplaykit/gkrandomdistribution/d6().md)
- [init(forDieWithSideCount:)](gameplaykit/gkrandomdistribution/init(fordiewithsidecount:).md)
