dice.Roll()

This commit is contained in:
v2ray committed 2016-01-21 22:45:44 +01:00
1 parent d623b1809d
commit 37a9d8ef50
6 files changed
+23 -36

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
package dice
import (
"math/rand"
)
func Roll(n int) int {
if n == 1 {
return 0
}
return rand.Intn(n)
}