Browse Source

Empty engine timeline at beginning of run

pull/1/head
Stephanie Gredell 7 months ago
parent
commit
5fe93cdff5
  1. 2
      internal/simulation/engine.go

2
internal/simulation/engine.go

@ -168,6 +168,8 @@ func NewEngineFromDesign(design design.Design, duration int, tickMs int) *Engine
func (e *Engine) Run() { func (e *Engine) Run() {
const tickMS = 100 const tickMS = 100
currentTimeMs := 0 currentTimeMs := 0
// this probably isn't necessary but is here just in case
e.Timeline = e.Timeline[:0]
for tick := 0; tick < e.Duration; tick++ { for tick := 0; tick < e.Duration; tick++ {
snapshot := TickSnapshot{ snapshot := TickSnapshot{

Loading…
Cancel
Save