Plumbed Delta and the IdGenerator back through

This commit is contained in:
sm
2014-03-31 23:21:20 -07:00
parent 8b52f93ca5
commit a956162205
5 changed files with 27 additions and 10 deletions
+2
View File
@@ -14,6 +14,7 @@ import (
type Config struct {
Tick int `json:"tick"` // ms
Timescale float32 `json:"timescale"`
Delta float32 `json:"delta"`
Width int `json:"width"`
Height int `json:"height"`
Obstacles int `json:"obstacles"`
@@ -61,6 +62,7 @@ func LoadConfig(filename string) (Config, error) {
return c, errors.New(fmt.Sprintf("config parse error: %s", err))
}
}
c.Delta = (float32(c.Tick) / 1000.0) * float32(c.Timescale)
log.Printf("final config: %+v", c)
return c, nil
}