diff --git a/examples/games/life/main.go b/examples/games/life/main.go index 74cb4106..cc84c50a 100644 --- a/examples/games/life/main.go +++ b/examples/games/life/main.go @@ -4,7 +4,7 @@ import ( "math/rand" "time" - "github.com/gen2brain/raylib-go/raylib" + rl "github.com/gen2brain/raylib-go/raylib" ) const ( @@ -32,7 +32,7 @@ type Game struct { } func main() { - rand.Seed(time.Now().UnixNano()) + rand.New(rand.NewSource(time.Now().UnixNano())) game := Game{} game.Init(false) diff --git a/raylib/raylib.go b/raylib/raylib.go index c15db3fa..4eb55297 100644 --- a/raylib/raylib.go +++ b/raylib/raylib.go @@ -200,6 +200,9 @@ const ( // Set to try enabling interlaced video format (for V3D) FlagInterlacedHint = 0x00010000 + // KeyNull is used for no key pressed + KeyNull = 0 + // Keyboard Function Keys KeySpace = 32 KeyEscape = 256