Plumbed Delta and the IdGenerator back through
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user