diff options
author | Joop Kiefte <ikojba@gmail.com> | 2020-09-12 09:13:18 +0200 |
---|---|---|
committer | Joop Kiefte <ikojba@gmail.com> | 2020-09-12 09:13:18 +0200 |
commit | 901952561d272c64a6fe31d303b06768389826d1 (patch) | |
tree | 7c777570d540fcfde83f9338d247bbe23d93a7cc | |
parent | 3edb4c1779ae23dd976c067622f2aaee9ac98f5d (diff) |
Seed randomizerv0.1.0
-rw-r--r-- | main.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -5,6 +5,7 @@ import ( "git.kiefte.eu/lapingvino/clitris/tris" "github.com/pkg/term" "time" + "math/rand" ) // GetKey() returns the key currently pressed. It always returns a 3 byte slice. Check first element for Escape for handling arrow keys @@ -21,6 +22,7 @@ func GetKey() []byte { } func main() { + rand.Seed(time.Now().UnixNano()) var f tris.Field var floor, topout, harddrop bool var x, y int |