mirror of
https://gitlab.com/EternalWanderer/dice-roller.git
synced 2024-11-28 21:03:51 +01:00
Moved rng back to main
This commit is contained in:
parent
a43117c270
commit
bed2f3df01
|
@ -4,13 +4,11 @@ import (
|
|||
"fmt"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"gitlab.com/EternalWanderer/dice-roller/Colors"
|
||||
)
|
||||
|
||||
func Toss(castAmount int) {
|
||||
rand.Seed(time.Now().Unix())
|
||||
var (
|
||||
coins []string
|
||||
coin string
|
||||
|
|
|
@ -4,7 +4,6 @@ import (
|
|||
"fmt"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"gitlab.com/EternalWanderer/dice-roller/Colors"
|
||||
)
|
||||
|
@ -13,12 +12,7 @@ var (
|
|||
surfaces, diceThrows, modidier int
|
||||
)
|
||||
|
||||
func genSeed() {
|
||||
rand.Seed(time.Now().Unix())
|
||||
}
|
||||
|
||||
func Cast(surfaces, diceThrows, modifier int) {
|
||||
genSeed()
|
||||
var (
|
||||
casts []int
|
||||
cast, total int
|
||||
|
@ -52,7 +46,6 @@ func Cast(surfaces, diceThrows, modifier int) {
|
|||
}
|
||||
|
||||
func SimpleCast(modifier int) int {
|
||||
genSeed()
|
||||
|
||||
var cast = rand.Intn(20) + 1
|
||||
|
||||
|
|
Loading…
Reference in a new issue