diff --git a/Dice/Dice.go b/Dice/Dice.go index 7451d05..a2d010f 100644 --- a/Dice/Dice.go +++ b/Dice/Dice.go @@ -13,8 +13,12 @@ var ( surfaces, diceThrows, modidier int ) -func Cast(surfaces, diceThrows, modifier int) { +func genSeed() { rand.Seed(time.Now().Unix()) +} + +func Cast(surfaces, diceThrows, modifier int) { + genSeed() var ( casts []int cast, total int @@ -48,6 +52,7 @@ func Cast(surfaces, diceThrows, modifier int) { } func SimpleCast(modifier int) int { + genSeed() var cast = rand.Intn(20) + 1