Why Nostr? What is Njump?
2025-03-26 14:54:33
in reply to

OceanSlim on Nostr: 18 func rollStat(rng *rand.Rand) int { dice := []int{rng.Intn(6) + 1, rng.Intn(6) + ...

18

func rollStat(rng *rand.Rand) int {
dice := []int{rng.Intn(6) + 1, rng.Intn(6) + 1, rng.Intn(6) + 1, rng.Intn(6) + 1}
minIndex := 0
for i := 1; i < 4; i++ {
if dice[i] < dice[minIndex] {
minIndex = i
}
}
return dice[0] + dice[1] + dice[2] + dice[3] - dice[minIndex]
}
Author Public Key
npub1zmc6qyqdfnllhnzzxr5wpepfpnzcf8q6m3jdveflmgruqvd3qa9sjv7f60