Merge pull request #286 from patrickReiis/master

fix: rand.Seed is deprecated
This commit is contained in:
Milan Nikolic 2023-10-16 11:41:08 +02:00 committed by GitHub
commit fa2a4d6247
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@ import (
"math/rand" "math/rand"
"time" "time"
"github.com/gen2brain/raylib-go/raylib" rl "github.com/gen2brain/raylib-go/raylib"
) )
const ( const (
@ -32,7 +32,7 @@ type Game struct {
} }
func main() { func main() {
rand.Seed(time.Now().UnixNano()) rand.New(rand.NewSource(time.Now().UnixNano()))
game := Game{} game := Game{}
game.Init(false) game.Init(false)