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

# d6()

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

## Declaration

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

## Return Value

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

## 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

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