Browse Source

add engine logic to simulation route

pull/1/head
Stephanie Gredell 7 months ago
parent
commit
9a7ccf7aa7
  1. 4
      router/handlers/simulation.go

4
router/handlers/simulation.go

@ -4,6 +4,7 @@ import ( @@ -4,6 +4,7 @@ import (
"encoding/json"
"net/http"
"systemdesigngame/internal/design"
"systemdesigngame/internal/simulation"
)
type SimulationHandler struct{}
@ -27,7 +28,8 @@ func (h *SimulationHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { @@ -27,7 +28,8 @@ func (h *SimulationHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
// TODO: Run simulation engine here
engine := simulation.NewEngineFromDesign(design, 10000, 100)
engine.Run()
// For now, return a mock successful response but eventually, we want to go to the results page(s)
response := SimulationResponse{

Loading…
Cancel
Save