diff --git a/control.go b/control.go index 795d19a..feb26bc 100644 --- a/control.go +++ b/control.go @@ -66,7 +66,8 @@ func (c *Controller) StartGame(w http.ResponseWriter, req *http.Request) { g := c.Games.get(requested_game_name) if g == nil { log.Printf("Game '%s' non-existant; making it now", requested_game_name) - g, err := NewGame(requested_game_name, width, height, obstacles, c.Conf.Tick, maxPoints, mode) + var err error + g, err = NewGame(requested_game_name, width, height, obstacles, c.Conf.Tick, maxPoints, mode) if err != nil { log.Printf("problem creating game: %s: %s", requested_game_name, err) b, _ := json.Marshal(NewFailure("game creation failure"))