refactored and added game save function (key: s)

This commit is contained in:
2024-05-23 14:27:42 +02:00
parent 3f0b4df8ff
commit 1001210d54
7 changed files with 639 additions and 494 deletions

11
system.go Normal file
View File

@@ -0,0 +1,11 @@
package main
import "runtime"
// returns current memory usage in MB
func GetMem() float64 {
var m runtime.MemStats
runtime.ReadMemStats(&m)
return float64(m.Alloc) / 1024 / 1024
}